class pet:
def set_age(self,age):
self.age=age
def get_age(self):
return self.age
pax=pet
pax.set_age(4)
Traceback (most recent call last):
File "C:\Functions\test.py", line 18, in <module>
pax.set_age(4)
TypeError: set_age() missing 1 required positional argument: 'age'
I am trying to pass 4 as the age. Obviously I am doing it wrong.
--
https://mail.python.org/mailman/listinfo/python-list
