A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-June/119905.html below:

[Python-Dev] Language reference updated for metaclasses

[Python-Dev] Language reference updated for metaclassesNick Coghlan ncoghlan at gmail.com
Tue Jun 5 12:20:42 CEST 2012
On Tue, Jun 5, 2012 at 6:34 PM, Mark Shannon <mark at hotpy.org> wrote:
> In this example the metaclass (ie the class of C) is type (C is int),
> even though the declared metaclass is 'silly'.
>
> I assume it is too late to change the name of the 'metaclass' keyword to
> 'factory', but we could use that terminology in the docs.

"factory" is also wrong (since a more derived metaclass from a base
class may be used instead). "metaclass_hint" or "requested_metaclass"
would be more accurate names - as in Python 2, the value provided in
the class definition is only one input to the algorithm that
determines the metaclass (which is now correctly described in the
language reference), rather than a simple factory function or direct
specification of __class__.

That slightly blurry terminology isn't new in Python 3 though, it's
been around for pretty much as long as Python has supported
metaclasses.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4