[Product-Developers] Re: subclass ATWorkgroup

Raphael Ritz r.ritz at biologie.hu-berlin.de
Wed Jun 17 21:05:01 UTC 2009

cswank wrote:
> Hello,
> I am trying to subclass ATWorkgroup.  When my __init__:
> def __init__(self, *args, **kw):
>         super(Vendor, self).__init__(*args, **kw)
>  gets called I get the following error:
> TypeError: super(type, obj): obj must be an instance or subtype of type

Depending on how ATWorkgroup is defined it might not support
calling 'super'. Try calling


(or similar) instead (ATWorkgroup being the class here).
This may well apply to all AT-based types.

I simply don't know whether we moved the entire stack to
using new-style classes by now.

Does that make a difference?


> When I set a pdb trace to see what obj is, it is an instance 'type', but it
> has no memory address.  Is there something I'm missing when I am doing this?
> Thanks,
> Craig
> PS.  The only reason I'm doing this is because I want the title field of my
> content type to be populated with a SelectionWidget.  Perhaps there is some
> way I can do this without subclassing?

More information about the Product-Developers mailing list