Multiple inheritance and __slots__

greg greg at cosc.canterbury.ac.nz
Thu Dec 14 16:25:50 EST 2006


Simon Brunning wrote:

> Difficulty with subclassing is the price you pay for abusing slots.

Although you could have the same difficulty even
if you weren't abusing them.

It's just a limitation of the implementation.
The use of __slots__ forces a particular layout
im memory, and you can only do that for one
base class at a time.

--
Greg



More information about the Python-list mailing list