How to do elegant error handling in Python

visit shbcf.ru