[issue24070] Exceptions and arguments disappear when using argparse inside with statement
Benjamin Peterson
report at bugs.python.org
Tue Apr 28 20:29:16 CEST 2015
Benjamin Peterson added the comment:
I'm not sure why this is so surprising. parse_args in __exit__ raises a SystmExit, which the Python interpreter takes to mean the program is responsibly exiting. I don't think any other behavior would be reasonable. e.g. sys.exit() in an except clause shouldn't cause the exception to be printed.
----------
nosy: +benjamin.peterson
resolution: -> not a bug
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24070>
_______________________________________
More information about the Python-bugs-list
mailing list