I have a class in python and I'd like to get one of several attributes depending on a string like this:
class my_class:
def __init__(self):
self.att1=1
self.att2=2
self.att3=3
def getatt (self, number):
return self.att(number)
How can I make this happen?