I am getting an AttributeError when I am trying to inherit an attribute from parent's class function. Does this mean that I can't inherit it directly from parent's function? This is the output:
AttributeError: 'Two' object has no attribute 'name'
and this is the code itself:
This is the code:
class One:
def ready(self):
self.name = 'John'
class Two(One):
def __init__(self):
print(self.name)
two = Two()