Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Human:
- @classmethod
- def mynameis(cls):
- print("Human said: I'm {0}".format(cls.__name__))
- class Pepa(Human):
- @classmethod
- def mynameis(cls):
- print("Pepa said: I'm {0}".format(cls.__name__))
- cls.__super.mynameis()
- Pepa._Pepa__super = super(Pepa, Pepa)
- Pepa().mynameis()
- class Josef(Pepa):
- pass
- Josef._Josef__super = super(Josef)
- Josef().mynameis()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement