[Python-Dev] PEP 8 updates/clarifications

Steve Holden steve at holdenweb.com
Sat Dec 10 10:20:14 CET 2005


Robert Brewer wrote:
> Barry Warsaw wrote:
> 
>>Again, I'd say something like: Since your exceptions
>>will be classes, use the CapWord naming convention for
>>classes to name your exceptions. It is recommended
>>that your exception class end in the word "Error".
> 
> 
> Unless, of course, your exception is not an error (like the
> aforementioned HTTPRedirect). ;)
> 
For library modules I'd recommend that the exception hierarchy be rooted 
at either BaseError (for modules not designed from import-*) or 
ModulenameBaseError (for those that are).

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/



More information about the Python-Dev mailing list