I have the following code:
class aa(object):
def __init__(self):
self.height = 12
class bb(aa):
def __init__(self):
self.weight = 13
AA = aa()
BB = bb()
I am trying to access the variable initialized in the Parent class (aa), using the Child object as below. Please suggest the correct way to do it as I am getting errors doing this way:
(If someone can point me to a good documentation on subclassing in Python, it would be great.)
print AA.height # 12
print BB.height # Error