Remove the ability to slice/index on exceptions per PEP 352.

This commit is contained in:
Brett Cannon 2007-02-27 00:15:55 +00:00
parent 44c526174d
commit ba7bf49a54
8 changed files with 16 additions and 46 deletions

View file

@ -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: