[issue24070] Exceptions and arguments disappear when using argparse inside with statement

Roy Hyunjin Han report at bugs.python.org
Wed May 6 19:39:00 CEST 2015


Roy Hyunjin Han added the comment:

The behavior may not be surprising from a technical perspective, but it is unintuitive.

I think exceptions inside a with statement should trigger a traceback, unless you are saying that it is the responsibility of the author to catch and raise the exception inside __exit__, which feels to me like a workaround that is specific to parse_args.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24070>
_______________________________________


More information about the Python-bugs-list mailing list