[Zope] Error:unbound method __init__() must be called with instance as first argument

Serg sutni at yandex.ru
Fri Apr 9 08:28:38 EDT 2004


--- file A.py ---
class CA:
    "class for my needs"
    def __init__(self, a=0):
        "init"
        self.__a=a

--- file B.py ---
from A import CA
from OFS import SimpleItem
class CB(SimpleItem.SimpleItem , CA ):
    "class B"
    def __init__(self, id, docN):
        "init"
        CA.__init__(self)
        self.id=id
        self.docN=docN

 On add object of CB Zope write:
        Site Error
        An error was encountered while publishing this resource.
        Error Type: TypeError
        Error Value: unbound method __init__() must be called with instance
as first argument

Where is this Error?

Regard,
Serg.




More information about the Zope mailing list