Chapter 3
■
Unittest
50
def add(self, x, y):
return(x + y)
def mul(self, x, y):
return(x * y)
def mul(self, x, y):
return(x - y)
def __del__(self):
"""Destructor for this class..."""
print("Destroying object : " + self.__class__.__name__)
Save the code in Listing
3-13
as the file mymathsimple.py in the mypackage directory.
Do'stlaringiz bilan baham: