Skip to content

Instantly share code, notes, and snippets.

@booiljung
Last active May 29, 2019 14:47
Show Gist options
  • Save booiljung/f36c179fe08555f6cf5193b1a49d93c3 to your computer and use it in GitHub Desktop.
Save booiljung/f36c179fe08555f6cf5193b1a49d93c3 to your computer and use it in GitHub Desktop.
# https://www.facebook.com/groups/pythonkorea/permalink/2257134351036380/
class Interface:
def __init__():
pass
def __method__():
pass
class A(Interface):
def __init__(para1):
self.para1 = para1
def __method__():
...
pass
class SubB(Interface):
def __init__(int1:Interface, para2):
self.int1 = int1
self.para2 = para2
class SubC(Interface):
def __init__(int1:Interface, para3):
self.int2 = int2
self.para2 = para3
a = A()
b = SubB(a, para2)
c = SubC(a, para3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment