消息 [396289]
> 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. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2021-06-21 21:14:18 | dlenski | 修改 | recipients:
+ dlenski, benjamin.peterson, xtreak, iritkatriel |
| 2021-06-21 21:14:18 | dlenski | 修改 | messageid: <1624310058.31.0.636783747856.issue30238@roundup.psfhosted.org> |
| 2021-06-21 21:14:18 | dlenski | 链接 | issue30238 messages |
| 2021-06-21 21:14:18 | dlenski | 创建 | |
|