the first arg to super() must be a type, not a class obj?

Steve Holden steve at
Fri Sep 8 10:15:36 CEST 2006

metaperl wrote:
> On p.282 of "Python Cookbook" and in the Python docs on calling super:
> it is clear that the first argument to super is a class and not a type.
> However, for the code below, I am getting an error when attempting to
> provide a class as my first argument and don't understand why. Also,
> since this is my first attempt at writing anything of any seriousness
> in Python, any other feedback is welcome.
I believe it needs to be a class whose ultimate ancestor is "object", 
and not an "old-style" class. This is probably why the docs suggest a 
type is required.

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list