mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Remove the ability to slice/index on exceptions per PEP 352.
This commit is contained in:
parent
44c526174d
commit
ba7bf49a54
8 changed files with 16 additions and 46 deletions
|
@ -178,7 +178,7 @@ def format_exception_only(etype, value):
|
|||
# It was a syntax error; show exactly where the problem was found.
|
||||
lines = []
|
||||
try:
|
||||
msg, (filename, lineno, offset, badline) = value
|
||||
msg, (filename, lineno, offset, badline) = value.args
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue