Hi,
I'm getting an odd error while trying to call the __init__ method of a
super class:
BaseField.__ini t__(self)
TypeError: unbound method __init__() must be called with BaseField
instance as first argument (got nothing instead)
This is the code:
class BaseField(objec t):
def _addFieldsToRec (self, rec, *fields):
for field in fields:
self.mfn[field] = rec
def __init__(self):
self._addFields ToRec(1,1)
self._addFields ToRec(2, 500,501,502,503 ,504,505,506,50 7,508)
class Field(BaseField ):
def __init__(self, value):
BaseField.__ini t__(self) # this seems to be the offending
line.
self.tag = value
What am I doing wrong?
Comment