[Python-Dev] Instance variable access and descriptors
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Jun 12 10:10:26 CEST 2007
Phillip J. Eby wrote:
> ...at the cost of slowing down access to properties and __slots__, by
> adding an *extra* dictionary lookup there.
Rather than spend time tinkering with the lookup order,
it might be more productive to look into implementing
a cache for attribute lookups. That would help with
method lookups as well, which are probably more
frequent than instance var accesses.
--
Greg
More information about the Python-Dev
mailing list