[Zope-CMF] Re: Content types based on Python objects
Philipp von Weitershausen
philipp at weitershausen.de
Wed Nov 28 13:49:07 EST 2007
Charlie Clark wrote:
> Am 28.11.2007 um 14:03 schrieb Charlie Clark:
>> class Grid(dict, PortalContent)
>> TypeError: Error when calling the metaclass bases multiple bases have
>> instance lay-out conflict
> Looks like using the old favourite UserDict solve the incompatability
> class Grid(UserDict, PortalContent):
Right. You can't mix built-in types with ExtensionClasses (pretty much
anything in Zope 2 is an ExtensionClass). Actually, subclassing the
built-in types usually only works for trivial cases.
UserDict (or PersistentDict) is the right thing to use here.
More information about the Zope-CMF