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

Aahz aahz at pythoncraft.com
Mon Feb 10 18:51:21 CET 2003

In article <just-E0D7CA.18402010022003 at news1.news.xs4all.nl>,
Just  <just at xs4all.nl> wrote:
>In article <b28l61$7bg$1 at panix2.panix.com>, aahz at pythoncraft.com (Aahz) 
>> 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).
>The "Don Beaudry hook" did not require a special module. It was still a 
>pain to work with, but it was there. Here's a 1.5.2 session:

<litella> Never mind! </litella>  I misremembered.
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