Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> class A(object):
- ... def hello(self):
- ... print 'hello'
- ...
- >>> class B(object):
- ... def hello(self):
- ... print ' world!'
- ...
- >>> class C(A, B):
- ... pass
- ...
- >>> c = C()
- >>> c.hello()
- hello
- >>> class D(B, A):
- ... pass
- ...
- >>> d = D()
- >>> d.hello()
- world!
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement