Feb. 19, 2002
10:23 p.m.
From: Kevin Jacobs <jacobs@penguin.theopalgroup.com>
On Tue, 19 Feb 2002, Samuele Pedroni wrote:
Personally I don't expect slots to behave like attributes. I mean, the different naming is a hint.
For me, slot declarations are a hint that certain attributes should be allocated 'statically' versus the normal Python 'dynamic' attribute allocation.
Interesting but for the implementation: class f(file): __slots__ = ('a',) slot a and file.softspace are in the same league, which is not attributes' league. They are struct member and the descriptor logic to access them exploit this.