[Zope] classmethod() and zope?

Dieter Maurer dieter at handshake.de
Mon Feb 28 13:04:53 EST 2005


Jürgen Herrmann wrote at 2005-2-28 15:38 +0100:
> ...
>i have the following method defined in an extension class:
>    def reInitClass(cls):
>        """ docstring """
>        cls().reInit()
>    reInitClass = classmethod(reInitClass)

"classmethod" is a new style class concept (it is a descriptor).

> ...
>  File "/home/apis/zope-bliss01/Products/ViewContainer/__init__.py", line
>10, in initialize
>    ViewContainer.reInitClass()
>TypeError: 'classmethod' object is not callable

Zope's ExtensionClass'es are still old style classes.
This will change with Zope 2.8.


You must wait until then...

-- 
Dieter


More information about the Zope mailing list