[Zope3-Users] Calling method of superclass

Florian Lindner He mailinglists at xgm.de
Wed May 17 13:10:06 EDT 2006


Hello,
should be a simple problem, but...

I have a class that is registered as a NameChooser:

from zope.app.container.contained import NameChooser

  class XGMNameChooser(NameChooser):
    implements(INameChooser)
    
    def chooseName(self, name, object):
        if IAbbreviation.providedBy(object):
            [...]
            return n
        else:
            return super(NameChooser, self).chooseName(name, object)

I want to take care only of the objects that are of type IAbbrevation. But I 
can't call the 

File "/home/florian/Desktop/zope/lib/python/xgm/xgm.py", line 35, in 
chooseName
    return super(NameChooser, self).chooseName(name, object)
AttributeError: 'super' object has no attribute 'chooseName'

What am I doing wrong?

Florian


More information about the Zope3-users mailing list