Error when calling superclass __init__ method

Peter Otten __peter__ at web.de
Sun May 18 08:11:34 EDT 2008


Maese Fernando wrote:

> I'm getting an odd error while trying to call the __init__ method of a
> super class:
> 
> BaseField.__init__(self)
> TypeError: unbound method __init__() must be called with BaseField
> instance as first argument (got nothing instead)
> 
> 
> This is the code:

No, it isn't. Please provide the actual code or, better, a minimal
example. Don't forget to run it to verify it shows the behaviour described
above before you post it.

> What am I doing wrong?

My bets are on

BaseField.__init__() # no self

Peter



More information about the Python-list mailing list