PEP idea. ( removing __slots__ )

simon place simon_place at whsmithnet.co.uk
Sun Jul 6 13:40:28 EDT 2003


i can't think of a point for __slots__ except to save the overhead of a 
dict, this is why you DON'T HAVE a __dict__ when __slots__ is defined.

__slots__ should generally be used to improve the performance/footprint 
of small/transient classes, ( it also prevents new instance variables 
but this appears to be more of a side effect.)

The point of the combining is to simplify, you know, based on the idea 
that keeping the language simply ( and logical ) aids comprehension.





More information about the Python-list mailing list