Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [12]: class Base:
- 2 def __init__(self):
- 3 print("I'm base")
- 4
- 5 class Child(Base):
- 6 def __init__(self):
- 7 print("I'm child")
- 8
- In [13]: c = Child()
- I'm child
- In [14]: class Base:
- 2 def __init__(self):
- 3 print("I'm base")
- 4
- 5 class Child(Base):
- 6 def __init__(self):
- 7 super().__init__()
- 8 print("I'm child")
- 9
- In [15]: c = Child()
- I'm base
- I'm child
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement