hasattr 17% less harmful
Turns out that as of Python 2.6 hasattr no longer catches KeyboardInterrupt and SystemExit. So now it’s only dangerous to use in cases where you aren’t 100% sure you’ll never ever be looking at properties rather than plain attributes (in my book that means “never”, but YMMV), as opposed to before 2.6, where it’s completely insane, and a code smell that should have you panicked into a corner.
(Source: docs.python.org)