Some thoughts/ideas: - Create [user-defined exceptions](http://docs.python.org/tutorial/errors.html#user-defined-exceptions) to hide implementation details - Functions should document the exceptions they raise - etc... Some references: [Python Tutorial - Errors and Exceptions](http://docs.python.org/tutorial/errors.html) [Python Built-in Exceptions](http://docs.python.org/library/exceptions.html) [Python Exception Handling Techniques](http://www.doughellmann.com/articles/how-tos/python-exception-handling/index.html)