Jeremy Hylton
2002-08-19 13:26:56 UTC
__slots__ = ['notes']
pass
TypeError: multiple bases have instance lay-out conflict
Could someone explain this error message and why the above Eggs class
definition is prohibited.
The builtin type dict and a new-style class with slots both definepass
TypeError: multiple bases have instance lay-out conflict
Could someone explain this error message and why the above Eggs class
definition is prohibited.
custom object layouts at the C level. The C layout of Spam has a
specific slot for the notes attribute, while the dict type has its
hashtable. There's not way to resolve this conflict, because the
layout of the C structs is fixed for each type.
Jeremy