Interning own classes like strings for speed and size?

Hrvoje Niksic hniksic at xemacs.org
Wed Dec 29 06:25:29 EST 2010


Christian Heimes <lists at cheimes.de> writes:

> You are right as long as you don't try to rebind the variable.

And then only if you assign through an instance, which doesn't make
sense for a class-level cache.  Assignment like Example2._cache = {}
would work.



More information about the Python-list mailing list