When were metaclasses added? (was Re: For review: PEP 308 - If-then-else expression)

Aahz aahz at pythoncraft.com
Mon Feb 10 11:49:05 EST 2003


In article <7h33cmwyxea.fsf at pc150.maths.bris.ac.uk>,
Michael Hudson  <mwh at python.net> wrote:
>aahz at pythoncraft.com (Aahz) writes:
>>
>> What was implicit in mentioning frequency, I think, is that the
>> actual metric is frequency times power.  Metaclasses are very, very
>> powerful, so even a low frequency gives them many "feature points".
>> Also, metaclasses came essentially for free with new-style classes,
>> which have many other reasons for existing.
>
>Metaclasses were also already there, let's not forget.  

At the very most, that's two-thirds true.  It was essentially impossible
to use them from Python without loading a special module, and even then
there were many more restrictions on its use.  The *idea* of metaclasses
was certainly there (and essential/intrinsic to Python's object model),
but I think it's fair to say that metaclasses in Python had little more
existence than subclassing of builtin types (which you could
theoretically do from C prior to 2.2).
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Register for PyCon now!  http://www.python.org/pycon/reg.html




More information about the Python-list mailing list