deleting an object in python

37

>>> class Test:
...     def __del__(self):
...         print "deleted"
... 
>>> test = Test()
>>> del test
deleted

Comments

Submit
0 Comments