Possible Duplicate:
subclass __init__ overrides superclass’s
class A():
z = 'z it is'
def __init__(self):
self.a = 'a it is'
class B(A):
def __init__(self):
self.b = 'b it is'
b = B()
print b.z # z it is
print b.a # AttributeError: B instance has no attribute 'a'
b
is Instance of B
class which is inherited from A
class. Does it not implies that I can access attributes of parent class?