Greifen Sie auf Dynamicall zu, um Attribut Python zu nennen
obj = myobject()
i = 7
date7 = getattr(obj, 'date%d' % i) # same as obj.date7
Jealous Jellyfish
obj = myobject()
i = 7
date7 = getattr(obj, 'date%d' % i) # same as obj.date7
getattr(myobject, 'attr_name_string')