[Zope-dev] Extending a class' __bases__ at runtime
R. David Murray
bitz@bitdance.com
Tue, 28 Aug 2001 10:13:19 -0400 (EDT)
On Sun, 19 Aug 2001, Chris Withers wrote:
> > It's part of a scheme to easily register subclasses (not subclasses in the
> > pythonish sense, rather the Zope-and-meta-type sense) where modification
> > of the containing class is needed (some extra methods for example).
>
> I'd use the CMF instead, Types Tool is great for that ;-)
There's another reason to want to know the answer to this: the ability
to hotpatch the base classes of an existing zope class instead of
having to modify the source code for that class. This came up
for the person who was trying to create a version of the CMF that
used ZPatterns...and I don't recall hearing a solution.
Plus, it sure is a "surprise" that something that works in normal
python code doesn't work in Zope! I presume this is an ExtensionClass
issue, but I don't know enough to suss it out.
--RDM