Python `hasattr` method headache
hasattr function checks to see if an object has an attribute - a
fairly straightforward and sensible purpose. When I used it, however, it caused
some very subtle problems that were tricky and unintuitive to debug.
Read the full post: Python `hasattr` method headache