Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class a(object):
- v1 = "test"
- v2 = None
- def __init__(self, aO=None):
- if aO:
- self.__dict__.update(aO.__dict__)
- class b(a):
- def __init__(self, aO):
- a.__init__(self, aO)
- def concat(self):
- return self.v1 + self.v2
- aO = a()
- a.v2 = "test2"
- bO = b(aO)
- print bO.concat()
Add Comment
Please, Sign In to add comment