Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. >>> class A(object):
  2. ...   def hello(self):
  3. ...     print 'hello'
  4. ...
  5. >>> class B(object):
  6. ...   def hello(self):
  7. ...     print ' world!'
  8. ...
  9. >>> class C(A, B):
  10. ...   pass
  11. ...
  12. >>> c = C()
  13. >>> c.hello()
  14. hello
  15. >>> class D(B, A):
  16. ...   pass
  17. ...
  18. >>> d = D()
  19. >>> d.hello()
  20.  world!
  21. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement