Guest User

Untitled

a guest
Jun 25th, 2012
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #!/usr/bin/python2.6
  2.  
  3. class foo(object):
  4.     def x(self):
  5.         print 'foo'
  6.  
  7. class foo2(foo):
  8.     def x(self):
  9.         print 'foo2'
  10.         super(self.__class__, self).x() # wrong
  11.  
  12. class foo3(foo2):
  13.     def x(self):
  14.         print 'foo3'
  15.         super(foo3, self).x()
  16.  
  17. f = foo3()
  18. f.x()
Advertisement
Add Comment
Please, Sign In to add comment