Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python class destroying

class animal:
  def __init__(self,name):
    self.Name = name
  def __del__(self):
    print(self.Name+" has died D:")
    
ben = animal("Ben")
def deleteObj(obj):
  del obj
  
deleteObj(ben)
 
PREVIOUS NEXT
Tagged: #python #class #destroying
ADD COMMENT
Topic
Name
7+8 =