Advertisement
Mofeoluwa

Untitled

Apr 1st, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. class Store():
  2.     def __init__(self):
  3.         self.owner = "Boris"
  4.     def exclaim(self):
  5.         return "I'm defined in the superclass"
  6. class HardwareStore(Store):
  7.     def __init__(self):
  8.         super().__init__(self)
  9.  
  10. home_depot = HardwareStore()
  11. home_depot.owner
  12. home_depot.exclaim()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement