Trying to figure out how I can do the following. Suppose I have some function which has an attribute that I want to set. generically let's call it: func.attrib = ['list']. the challenge is that 'func' can vary according to the result of some look up (say, based on a key within a dictionary).
so, I might want to say:
func.attrib = ['list']
OR
func1.attrib = ['list']
OR
func2.attrib = ['list']
etc
where func, func1, func2 are the result of a look up in a dictionary.
Treating func as a string and appending ".attrib" will not work, so I'm guessing a more specific method of formatting is required.
any help appreciated!