I have a class, lets say:
#!/usr/bin/env python
class testclass(object):
def __init__(self, a, b, c):
self.__attr1 = a
self.__attr2 = b
self.__attr3 = c
def meth(self):
## run some checks on self.__attr1, self.__attr2, self.__attr3
## How to do that?
if __name__ == '__main__':
t = testclass("dd", "ee", "gg")
Question:
In case I have several attributes and not just three what is the best way to write the meth method ? I am going to run the same check on all attributes.