PEP idea. ( removing __slots__ )
Martin v. Löwis
martin at v.loewis.de
Sun Jul 6 15:14:10 EDT 2003
More information about the Python-list mailing list
Sun Jul 6 15:14:10 EDT 2003
- Previous message (by thread): PEP idea. ( removing __slots__ )
- Next message (by thread): PEP idea. ( removing __slots__ )
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
simon place <simon_place at whsmithnet.co.uk> writes: > 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. No. Some classes have slots for efficiency, and their subclasses have dictionaries for generality. Likewise, some classes have slots to save the dictionary for most instances, but some instances may need additional attributes, in which case Python creates the dictionary on-the-fly. > The point of the combining is to simplify, you know, based on the idea > that keeping the language simply ( and logical ) aids comprehension. I know. Regards, Martin
- Previous message (by thread): PEP idea. ( removing __slots__ )
- Next message (by thread): PEP idea. ( removing __slots__ )
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list