[Python-3000] Metaclasses in Py3K

Phillip J. Eby pje at telecommunity.com
Tue Dec 12 19:20:33 CET 2006

At 10:11 AM 12/12/2006 -0800, Thomas Wouters wrote:

>On 12/12/06, Jim Jewett 
><<mailto:jimjjewett at gmail.com>jimjjewett at gmail.com> wrote:
>>On 12/8/06, Guido van Rossum <<mailto:guido at python.org>guido at python.org> 
>> > I've been thinking about this too, and I think it's reasonable to let
>> > the metaclass provide the dict to be used as locals.
>I do wonder about this though: will it require a particular type (like a 
>dict)? The current code uses fast locals,

Uh, wha?  Did this change in Py3K?  Python 2.x doesn't do this and can't do 
it without introducing backward incompatibility.  In 2.x, class bodies do 
NOT use fast locals, any more than module bodies do.

In any case, the performance within the class suite isn't especially 
important; it's rare that there are any loops within a class body, or that 
one creates classes within frequently-executed loops.

More information about the Python-3000 mailing list