Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Spam(object):
- def wave():
- print 'Hi, world'
- class Sausage(Spam):
- def wave():
- print 'Sausages are tastier than spam.'
- super(Sausage, self).wave() # call the superclass's wave method too
- sausage = Sausage()
- sausage.wave()
Add Comment
Please, Sign In to add comment