Message260559
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, *, ...) |
|
Date |
User |
Action |
Args |
2016-02-20 05:12:44 | martin.panter | set | recipients:
+ martin.panter, brett.cannon, terry.reedy |
2016-02-20 05:12:44 | martin.panter | set | messageid: <1455945164.61.0.437598848555.issue26389@psf.upfronthosting.co.za> |
2016-02-20 05:12:44 | martin.panter | link | issue26389 messages |
2016-02-20 05:12:44 | martin.panter | create | |
|