[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-10-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: See the superseding issue; 2to3 is deprecated and headed towards deletion. -- ___ Python tracker ___ _

[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-10-20 Thread Daniel Lenski
Daniel Lenski added the comment: Why was this closed? As I wrote in a previous comment, this situation can be automatically identified and addressed via static analysis in the vastly-predominant case, where the Exception object is assigned via an `exception ... as exc:` clause. --

[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- stage: test needed -> resolved status: open -> closed superseder: -> Close 2to3 issues and list them here ___ Python tracker ___ __

[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-06-21 Thread Daniel Lenski
Daniel Lenski 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:

[issue30238] 2to3 doesn't detect or fix Exception indexing

2021-06-20 Thread Irit Katriel
Irit Katriel 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. -- nosy: +iritkatriel resolution: -> wont fix status: open -> pending ___

[issue30238] 2to3 doesn't detect or fix Exception indexing

2018-09-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30238] 2to3 doesn't detect or fix Exception indexing

2017-05-05 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +benjamin.peterson stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue30238] 2to3 doesn't detect or fix Exception indexing

2017-05-02 Thread Daniel Lenski
New submission from Daniel Lenski: Python 2.7 allows indexing an Exception object to access its args list. >>> e=Exception('foo','bar','baz') >>> assert e[0] is e.args[0] This doesn't work in 3.5: >>> e=Exception('foo','bar','baz') >>> e.args[0] 'foo' >>> e[0] TypeError: 'Exception' object is