[CentralOH] __slots__

Mark Erbaugh mark at microenh.com
Fri Jun 6 15:19:35 CEST 2008

Does anyone know how a class/instance with __slots__ finds an attribute?
Without __slots__, there is a dict that is searched for the attribute.
With __slots__ what is the lookup mechanism?  I'm wondering if it
involves a sequential lookup, thus making __slots__ access slower for
classes with a large number of attributes.


More information about the CentralOH mailing list