python access class variable by string

37

# name must be a string
# default is optional
getattr(object, name, default)

Comments

Submit
0 Comments