[Zope] changing ZClass bases

Mitchell Model mlm@acm.org
Fri, 17 Aug 2001 09:59:36 -0400


I'm an extremely experienced object technologist just getting into Zope.  The Zope Book (p. 211) says that it's not possible to change the base classes of a ZClass.  The wording and context are a bit ambiguous, so I'm not entirely sure, but the obvious reading is that once you've defined a ZClass you cannot add, remove, or replace any of its base classes.

Is this true?  Or does it just mean "not through the techniques being discussed in that part of the book"?  What do I do if I've been developing a ZClass and decide I need to add (or remove) some functionality through base classes?  For example, suppose I want to add persistence later on?  Is the answer different if I don't have any instances I need to keep?  Is there a way to export a ZClass to an editable text format, so I could delete it from Zope, make the changes, then reimport it?