apt.shansen at gmail.com
Wed Jul 29 16:36:32 EDT 2009
> In the attached http://www.nabble.com/file/p24726902/test.py test.py
> it appears that additional statements execute after the call to
> I'll be grateful if anyone can shed light on why this is happening. Below
> is a copy of some sample I/O. Note that in the last case I get additional
> output after what should be the final error message.
A bare "except:" catches ALL exceptions; including SystemExit which is
sys.exit. And KeyboardInterrupt, too. That's why its basically a bad
idea to use bare excepts unless you really, really, really need to.
Try 'except Exception' instead. SystemExit and such do not inherit
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list