assignment to __class__ (was Re: Copy constructors)

Terry Reedy tjreedy at home.com
Mon Aug 13 13:01:10 EDT 2001


"Guido van Rossum" <guido at python.org> wrote in message
news:cpzo94dqvy.fsf at cj20424-a.reston1.va.home.com...
[snip]
> Actually, speeding up Python is a very common request

If a class has base class[es], it would seem that multiple lookups
would slow name resolution.  If  all base classes are static, so that
method references are fixed in name and target, then the class
hierarchy could be 'flattened' by putting references to all base class
methods in the local __dict__ for a time/space tradeoff.  Maybe make
optional with __flatten__ attribute.

Terry J. Reedy







More information about the Python-list mailing list