I want to iterate on self attributes from self function in Python3, but I have not found any similar. I found how to do it outside the class here.
My question is, is it possible?
class Foo:
def __init__(self, attr1, attr2):
self.attr1 = attr1
self.attr2 = attr2
def method1(self):
#Return sum of the values of the self attributes
pass