Python style: exceptions vs. sys.exit()

Ross Ridge rridge at csclub.uwaterloo.ca
Wed Sep 24 17:31:29 CEST 2008


Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> wrote:
> Presumably somebody has suggested that calling sys.exit() was a good 
> option. I'm curious to what possible reason they could give for such a 
> poor choice.

Grant Edwards  <invalid at invalid> wrote:
>Same here.  It's like an automotive engine controls designer
>asking if a failed O2 sensor should turn on the check engine
>light or blow up the car.

No, it's more like asking if the failed sensor should turn on a strange
and mysterious light on the dashboard and then blow up the car if the
driver doesn't immediately stop and check the engine.  The owners manual
would only vaguely hint at the fact that this could happen.

					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