the first arg to super() must be a type, not a class obj?
steve at holdenweb.com
Fri Sep 8 10:15:36 CEST 2006
> 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 http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list