Daniel Lenski <[email protected]> added the comment:
> There is no way to know through static analysis that the subscript is on an
> object of type exception. I think this should be closed as won't fix.
In almost all cases, the variable in question will receive its value via
`except ... as e:`.
try:
...
except (Exception1, Exception2, ...) as e:
e[0]
Seems to me that it should be possible for 2to3 to handle this large subset of
applicable cases via static analysis.
----------
status: pending -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue30238>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com