- For example, in the Python code below, numSides is a data attribute (the Python equivalent of an instance variable).
- numSides does not require it’s own declaration, thus its use in
self.numSides
is sufficient for it’s existence.class Die:
def setSides(self, sides):
self.numSides = sides
- numSides does not require it’s own declaration, thus its use in