Martin Panter added the comment: There is precedent with Python 2’s “raise” statement for accepting an exception instance for the first parameter (where an exception class would otherwise be passed). Also, generator.throw() supports this; see Issue 14911 for clarifying its documentation.
I would support changing the following signatures so that the first parameter could hold the value, not just the type: print_exception(etype, value=None, tb=None, limit=None, ...) format_exception_only(etype, value=None) format_exception(etype, value=None, tb=None, limit=None, ...) TracebackException(exc_type, exc_value=None, exc_traceback=None, *, ...) ---------- nosy: +martin.panter type: -> enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26389> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com