Guest User

Untitled

a guest
Oct 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import abc
  2.  
  3.  
  4. class Dog(metaclass=abc.ABCMeta):
  5. @abc.abstractmethod
  6. def eat_shit(self):
  7. return NotImplemented
  8.  
  9. @abc.abstractmethod
  10. def pee(self):
  11. return NotImplemented
  12.  
  13.  
  14. class Shiba(Dog):
  15. def eat_shit(self):
  16. print("I'm eating shit".format())
  17.  
  18. def pee(self):
  19. print("I'm peeing........")
  20.  
  21.  
  22. Shiba().eat_shit()
  23. # Result > I'm eating shit
  24.  
  25. Shiba().pee()
  26. # Result > I'm peeing........
Add Comment
Please, Sign In to add comment