A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062180.html below:

[Python-Dev] quit() on the prompt

[Python-Dev] quit() on the promptOleg Broytmann phd at mail2.phd.pp.ru
Wed Mar 8 12:45:55 CET 2006
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/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4