Misc

Accessing attribute by string

somebody may come up with :

result = eval('myclass.{}()'.format(name))

better :

result = getattr('myclass', name)()