How can I achieve such job:
def get_foo(someobject, foostring):
return someobject.foostring
IE:
if I do get_foo(obj, "name")
it should be calling obj.name
(see input as string but I call it as an attritube.
Thanks
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…