Guest User

Untitled

a guest
Nov 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class a(object):
  2. v1 = "test"
  3. v2 = None
  4.  
  5. def __init__(self, aO=None):
  6. if aO:
  7. self.__dict__.update(aO.__dict__)
  8.  
  9. class b(a):
  10. def __init__(self, aO):
  11. a.__init__(self, aO)
  12.  
  13. def concat(self):
  14. return self.v1 + self.v2
  15.  
  16. aO = a()
  17. a.v2 = "test2"
  18.  
  19. bO = b(aO)
  20. print bO.concat()
Add Comment
Please, Sign In to add comment