I have two questions:
1) I want to write a statement like: superVar = [subVar1 = 'a', subVar2 = 'b']
After this statement, I want:
superVar = ['a', 'b']
subVar1 = 'a'
subVar2 = 'b'
Is this somehow achievable in python?
2) I want to do the following inside a class's init function:
self.superVar = [v1 = 'a', v2 = 'b']
After this statement, I want:
self.superVar = ['a', 'b']
self.superVar.v1 = 'a'
self.superVar.v2 = 'b'
i.e. have 'superVar' be part of the name of the other variables.
As you might have guessed, what I really want to do is (2) above. (1) is just the first step and I would be happy even with that, if (2) is not possible.
Thanks a lot! Gaurav