I'm trying to learn Python's OOP standards, I've written a very simple code
class Human(object):
def __init__(self):
print("Hi this is Human Constructor")
def whoAmI(self):
print("I am Human")
class Man(Human):
def __init__(self):
print("Hi this is Man Constructor")
def whoAmI(self):
print("I am Man")
class Woman(Human):
def __init__(self):
print("Hi this is Woman Constructor")
def whoAmI(self):
print("I am Woman")
Seems pretty simple eh? Classic inheritance module of man and woman, what i can't understand is that when i create an object for woman or man why doesn't the constructor chaining occurs, and how one could possibly achieve polymorphism in Python.
This seems like a real vague and noob line of questioning, but i'm unable to put it any other way. Any help will be appreciated