exceptions -> Python 3, has_key() removed, PEP 8