Message396289
> 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. |
|
Date |
User |
Action |
Args |
2021-06-21 21:14:18 | dlenski | set | recipients:
+ dlenski, benjamin.peterson, xtreak, iritkatriel |
2021-06-21 21:14:18 | dlenski | set | messageid: <1624310058.31.0.636783747856.issue30238@roundup.psfhosted.org> |
2021-06-21 21:14:18 | dlenski | link | issue30238 messages |
2021-06-21 21:14:18 | dlenski | create | |
|