Python Best Practices

A repo to collect some Python’s best practices in the condition.

Misc

Accessing attribute by string

somebody may come up with :

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

better :

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