Phillip J. Eby wrote:
> At 11:07 AM 12/12/2006 -0800, Thomas Wouters wrote:
> 
>>I do wonder why classes don't use fast locals, though.

Probably because (a) class creation is rarely a speed
bottleneck in any program, and (b) by using a dict
you end up with it already in the right form for
passing to the class constructor.

>      def some_func(an_ob, whatever):
>          ...
> 
>      class Foo:
>          some_func = some_func
> 
> Wouldn't work any more if you switched to fast locals.

Which wouldn't be a huge loss, since you can always
rename the function to something different outside the
class.

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to