there exists following class.
class Reaction(object):
Var1 = "lorem"
Var2 = "impsum"
Var3 = "dolor"
I'd like to iterate over the attributes of this class, like in following code.
for value in Reaction:
print value
This should produce following output.
lorem
ipsum
dolor
I've already found this topic: How to iterate over a the attributes of a class, in the order they were defined?, but it doesn't really help me.
How can I make my class iterable?
EDIT: I thought of something similar like in this post: Build a Basic Python Iterator.