Issue3323
Created on 2008-07-09 07:22 by strangefeatures, last changed 2008-07-19 13:09 by georg.brandl.
| msg69460 (view) |
Author: Andy (strangefeatures) |
Date: 2008-07-09 07:22 |
|
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."
|
| msg70020 (view) |
Author: Georg Brandl (georg.brandl) |
Date: 2008-07-19 13:09 |
|
Added a note in r65136, thanks.
|
|
| Date |
User |
Action |
Args |
| 2008-07-19 13:09:52 | georg.brandl | set | status: open -> closed resolution: fixed messages:
+ msg70020 |
| 2008-07-09 07:22:58 | strangefeatures | create | |
|