Build-in or user-defined exceptions?

Fredrik Lundh fredrik at pythonware.com
Sat May 14 10:17:29 EDT 2005


Torsten Bronger wrote:

> Is it considered good style to raise build-in exceptions whereever
> one thinks it's appropriate?

yes.

> Is the definition of module exceptions derived from "IOError", "TypeError"
> etc. a good idea?

sure (when absolutely necessary).

> Is there some sort of style guide for recommended exceptions design in
> Python?

just use your intuition.

</F>






More information about the Python-list mailing list