Advertisement
Guest User

Untitled

a guest
May 31st, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. In [12]: class Base:
  2. 2 def __init__(self):
  3. 3 print("I'm base")
  4. 4
  5. 5 class Child(Base):
  6. 6 def __init__(self):
  7. 7 print("I'm child")
  8. 8
  9.  
  10. In [13]: c = Child()
  11. I'm child
  12.  
  13. In [14]: class Base:
  14. 2 def __init__(self):
  15. 3 print("I'm base")
  16. 4
  17. 5 class Child(Base):
  18. 6 def __init__(self):
  19. 7 super().__init__()
  20. 8 print("I'm child")
  21. 9
  22.  
  23. In [15]: c = Child()
  24. I'm base
  25. I'm child
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement