Best Method of Error Handling

Aahz aahz at pythoncraft.com
Fri Jun 11 14:38:17 EDT 2004


In article <889cbba0.0406060022.727e5802 at posting.google.com>,
Kamilche <klachemin at home.com> wrote:
>
>I'm totally new to Python error handling. I see there are many, many
>ways to handle errors in Python. What is the standard accepted 'best
>practice'?
>
>I will be writing unit tests for every module, and translating into
>different languages. If I call everything an 'Exception', I can easily
>load the messages from a text file... if I finely divide all the
>errors up into separate error classes, I can't load from a text file
>at run time. Or maybe I can, and I just don't see it.

Read through the code in /Lib/ -- you'll see many examples.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"as long as we like the same operating system, things are cool." --piranha



More information about the Python-list mailing list