On Wed, Mar 08, 2006 at 12:37:47AM +0100, Thomas Wouters wrote:
> Raising SystemExit("quit() called") has an additional benefit (although the
> wording could use some work):
> 
> >>> raise SystemExit("quit() called")
> quit() called
> 
> (At least, I consider that a benefit :-)

   It has a bad side-effect of returning an error code to the calling
shell:

$ python && echo Ok || echo Error\!
Python 2.4.2 (#1, Oct  3 2005, 20:57:52) 
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> raise SystemExit("quit() called")
quit() called
Error!

(At least, I consider that a bad side-effect.)

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to