Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get rid of an instance variable python

class Test(object):
    def __del__(self):
        print("Object deleted")

    def func(self):
        print("Random function")


obj = Test()
obj.func()
del obj

obj.func()
Source by tutorial.eyehunts.com #
 
PREVIOUS NEXT
Tagged: #rid #instance #variable #python
ADD COMMENT
Topic
Name
2+3 =