[issue30097] Command-line option to suppress "from None" for debugging

2020-02-29 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30097] Command-line option to suppress "from None" for debugging

2020-02-22 Thread Ethan Furman
Ethan Furman added the comment: The actual problem, I think, is that `from None` is suppressing more than it ought. Martin's example would work just fine if the only omitted exception was the one captured during its own try/except. Created issue39725. --

[issue30097] Command-line option to suppress "from None" for debugging

2020-02-22 Thread Ethan Furman
Ethan Furman added the comment: +1 for the idea. Instead of '-C' we could add it as one of the '-X' options -- it is, after all, a development issue. -- nosy: +ethan.furman ___ Python tracker

[issue30097] Command-line option to suppress "from None" for debugging

2018-01-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue30097] Command-line option to suppress "from None" for debugging

2017-05-10 Thread STINNER Victor
STINNER Victor added the comment: See also my old PEP 490 -- Chain exceptions at C level, more or less abandonned :-p -- nosy: +haypo, ncoghlan ___ Python tracker

[issue30097] Command-line option to suppress "from None" for debugging

2017-05-07 Thread Martin Panter
Martin Panter added the comment: This proposal would be useful. My use case is for when an API suppresses an external exception context: >>> import os >>> try: ... os.environ["NEW_VARIABLE"] = bug # Hidden exception ... finally: ... del os.environ["NEW_VARIABLE"] # KeyError ...

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-20 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The initial exception still is linked as __context__. You can write own implementation of traceback.print_exception() that ignores __suppress_context__. Alternatively you can just set __suppress_context__ to False. -- nosy: +serhiy.storchaka

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Raymond Hettinger
New submission from Raymond Hettinger: Filing this feature request on behalf of an engineering team that I work with. This team creates Python tools for use by other departments. Accordingly, their best practice is to use "raise CleanException from None" to give the cleanest error messages