[issue15209] Re-raising exceptions from an expression

Ethan Furman report at bugs.python.org
Wed Jun 27 23:36:33 CEST 2012


Ethan Furman <ethan at stoneleaf.us> added the comment:

Okay, I see your point.  It's also not difficult to work around if you really want to toss the extra info:

        except NameError:
            try:
                fallback_module.getch()
            except Exception as exc:
                raise exc from None

A total of three more words to get the desired behavior (and small ones at that).

I'll work on a doc patch.

----------

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


More information about the Python-bugs-list mailing list