[Tutor] TypeError: 'str' object is not callable
Alan Gauld
alan.gauld at blueyonder.co.uk
Sun Sep 7 23:38:09 EDT 2003
> > >>Or better still raise the SystemExit exception which
automatically
>
> From what I read in the Python in a Nutshell book, calling
sys.exit() does
> raise the SystemExit exception
Absolutely, but raising it directly saves the need to import sys and
particularly within a try/except clause is the natural paradigm to
use.
Using os._exit() on the other hand is like pulling the ejector
seat to land a plane. There's no clean up you just get out as fast
as possible.
Alan G.
More information about the Tutor
mailing list