attributeError
public text v1 · immutable>>> class A(object):
... def __init__(self):
... self.name = "A"
... self.myFunction()
...
>>> class B(A):
... def __init__(self):
... super(B, self).__init__()
... self.count = 0
... def myFunction(self):
... print self.count
...
>>> o = B()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 3, in __init__
File "<stdin>", line 4, in __init__
File "<stdin>", line 6, in myFunction
AttributeError: 'B' object has no attribute 'count'
>>>