New submission from Andy <[EMAIL PROTECTED]>: Suggest clarification on behaviour of the __slots__ attribute when inheriting from classes that don't have __slots__ defined. Obviously the superclass automatically creates __dict__, and it seems the subclass inherits this. I presume this is expected behaviour, but I think it would be worth clarifying in the 'Notes on using __slots__' section - perhaps add something like:
"If you define __slots__ on a subclass when its superclass doesn't have __slots__ defined, the superclass will automatically create a __dict__ instance which will be inherited by the subclass (as will other instance attributes). Defining __slots__ on the subclass doesn't block this inheritance." ---------- assignee: georg.brandl components: Documentation messages: 69460 nosy: georg.brandl, strangefeatures severity: normal status: open title: Clarify __slots__ behaviour when inheriting type: feature request versions: Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com