[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

Terry J. Reedy report at bugs.python.org
Fri Feb 12 17:24:48 EST 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

It seems to me that print_exception(None), etc, *should* raise something.  Printing "NoneType: None\n" makes no sense to me since NoneType is not an exception.  In 3.9, it raised TypeError for # of arguments.

I do note that in 3.9
>>> traceback.print_exception(None, None, None)
NoneType: None

I wonder what the rationale was.  It isn't because these functions never raise.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43146>
_______________________________________


More information about the Python-bugs-list mailing list