On Sat, 23 Apr 2011 06:25:51 +1000, Chris Angelico wrote:

> On Sat, Apr 23, 2011 at 12:08 AM, Mel <mwil...@the-wire.com> wrote:
>> But sys.exit() doesn't return a string.  My fave is
> 
> It doesn't return _at all_. Boom, process terminated.


Technically it raises an exception, which can then be caught by the usual 
exception-handling mechanism. So it's not quite Boom.

>>> try:
...     sys.exit(42)
... except SystemExit as e:
...     print(e.code)
...
42
>>>


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to