[Zope] changing ZClass bases

Chris McDonough chrism@zope.com
Fri, 17 Aug 2001 14:24:54 -0400


Hi Mitchell,

Please try to keep the discussion on the list... thanks!

Yes... for instance if you create a Python class as a base class for a
ZClass (by using one of several mechanisms... for an example see the
ZCatalog Product's __init__.py where it does "createZClassForBase"), you
can use a strategy where you subclass *only* from this class (it'll
appear in the list of classes from which you can subclass in the ZClass
creation interface).  Then rebase that Python class to your heart's
content without needing to rebase the ZClass at all.  This works pretty
well in practice.

Mitchell L Model wrote:
> 
> Cool, thanks for all the helpful information.  I've been debating
> between using Python classes and ZClasses, but it didn't occur to me
> to hybridize the approach!  Do I understand correctly that my Python
> classes would inherit the same bases I was going to use for my
> ZClasses -- that is, that the ZClass base class options are actual
> Python classes available to my Python classes?  (And what do I import
> to get to them?)
> --
> 
>      --- Mitchell

-- 
Chris McDonough                           Zope Corporation
http://www.zope.org                    http://www.zope.com

""" Killing hundreds of birds with thousands of stones """