Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bod:
- def __init__( self, x=0, y=0):
- self.x = x
- self.y = y
- def __del__(self):
- menoTriedy = self.__class__.__name__
- print "Objekt", menoTriedy, "bol zniceny"
- bod1 = Bod()
- bod2 = bod1
- bod3 = bod1
- bod4 = Bod()
- print id(bod1), id(bod2), id(bod3) , id(bod4)
- del bod1
- del bod2
- del bod3
- del bod4
Add Comment
Please, Sign In to add comment