Guest User

Untitled

a guest
Jan 22nd, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Parent():
  2.  
  3. def method(self, param):
  4. # Bugged
  5. do_stuff()
  6.  
  7. class Override(Parent):
  8.  
  9. def method(self, param):
  10. # Fixed (tested)
  11. param = fix_param(param)
  12. super(Parent, self).method(param)
  13.  
  14. class External():
  15.  
  16. def processing():
  17. # Same bug as in `Parent`
  18. param = get_param()
  19. obj = Override()
  20. obj.method(param)
Add Comment
Please, Sign In to add comment