Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save habnabit/0a5a7c7c63fa5d4811a13fad09ea4d8a to your computer and use it in GitHub Desktop.
Save habnabit/0a5a7c7c63fa5d4811a13fad09ea4d8a to your computer and use it in GitHub Desktop.
"""Please, let me know which child is calling me: 'parent' ? """
class A:
"""This is a mixin class to share code for DRY"""
def __init__(self, var=None):
super().__init__()
self.override_me()
def override_me(self):
print("let's do what i want there also please... i'm open mind, do you ?")
class Child1(A):
"""I'm a child of Mixin class A"""
def __init__(self, var):
super().__init__(var)
print("i can not show my ass, but maybe my parent can know me... what do you think ? possible or not ?")
def override_me(self):
print("youpi... there is Child1 call me")
class Child2(A):
"""I'm an other child of Mixin A"""
def __init__(self, var):
super().__init__(var)
print("is it clear for you know about what i want to get there ?")
class Child3(A):
"""You should see that i am also a child of A possibly..."
def __init__(self, var):
super().__init__(var)
print("Don't tell me to not do that if you don't know how to do that please, that doesn't halp me.")
print("imagine i just want to know how to do that and not trash patatoes... do YOU know how to do please?"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment