mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #27348: Restore “Exception: None” formatting in traceback module
This fixes a regression caused by revision 73afda5a4e4c. Also reverts the decimal test workaround added in revision 5f3dd0a2b1ab. Remove test_without_exception(). According to revision ecaafc32c500, this was added in Python 2 so that print_exc() would output “None” when called with no exception set. However print_exc() never worked like this in Python 3, and the use case is not documented. Restore TracebackCases class name (instead of SyntaxTracebackCases), because the class also tests other exceptions.
This commit is contained in:
parent
92bb90a9ff
commit
bb8b1cb6af
4 changed files with 18 additions and 7 deletions
|
@ -4106,7 +4106,7 @@ class Context(object):
|
|||
>>> context.create_decimal_from_float(3.1415926535897932)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
decimal.Inexact
|
||||
decimal.Inexact: None
|
||||
|
||||
"""
|
||||
d = Decimal.from_float(f) # An exact conversion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue