➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 dlenski
收信人 benjamin.peterson, dlenski, iritkatriel, xtreak
日期 2021-06-21.21:14:18
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1624310058.31.0.636783747856.issue30238@roundup.psfhosted.org>
In-reply-to
内容
> 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:18dlenski修改recipients: + dlenski, benjamin.peterson, xtreak, iritkatriel
2021-06-21 21:14:18dlenski修改messageid: <1624310058.31.0.636783747856.issue30238@roundup.psfhosted.org>
2021-06-21 21:14:18dlenski链接issue30238 messages
2021-06-21 21:14:18dlenski创建