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 to their users while hiding the noise of implementation details and internal logic. The exposed exceptions are a documented, guaranteed part of the API that users can reliably catch and handle. This has worked well for them; however, when they are debugging the library itself it would be nice to have a way to suppress all the "from None" code and see fuller stack traces that indicate root causes. One way to do this would be to have a command-line switch such as "python -C testcode.py". Where the "-C" option means "Always show the cause of exceptions even when 'from None' is present. ---------- components: Interpreter Core messages: 291844 nosy: rhettinger priority: normal severity: normal status: open title: Command-line option to suppress "from None" for debugging type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30097> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com