PEP idea. ( removing __slots__ )

simon place simon_place at whsmithnet.co.uk
Sun Jul 6 10:18:20 EDT 2003


The point is to combine __dict__ and __slots__ into a new __attribs__, 
the distinction being the type of __attribs__.  If you don't specify 
__attribs__ in the class you get the default __dict__ behavior, if you 
do, and use a tuple, then you get the __slots__ behavior, and you can 
easily tell which by checking the type, you could also iterate over the 
attributes without caring which it was.





More information about the Python-list mailing list