Python style: exceptions vs. sys.exit()

Ross Ridge rridge at csclub.uwaterloo.ca
Sat Sep 27 05:10:06 CEST 2008


Bruno Desthuilliers  <bruno.42.desthuilliers at websiteburo.invalid> wrote:
> Also note that there are quite a couples cases where the library authors 
> themselves cannot predict which exception types may be raised - as soon 
> as the library functions expect callback functions, file-like or 
> dict-like or whatever-like objects etc, it's the caller's responsability 
> to handle the exceptions that may be raised by what *he* passes to the 
> library...
 
Ross Ridge a écrit :
> Ug... that's another documentation pet-peeve of mine.  Libraries that
> say they take file-like (or whatever-like) object, but don't say exactly
> how file-like it needs.

Bruno Desthuilliers  <bruno.42.desthuilliers at websiteburo.invalid> wrote:
>Seems not to be such a problem in practice...

Not if you don't mind figuring out such things by trial and error or
looking at the source.

				Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge at csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  



More information about the Python-list mailing list