supporting-python-3 icon indicating copy to clipboard operation
supporting-python-3 copied to clipboard

Seems that 2to3 doesn't support issue with Exception object (A.9)

Open ilya-palachev opened this issue 5 years ago • 1 comments

Section A.9 says that the issue with Exception objects that are not iterable and indexable is supported by 2to3. But it seems that it doesn't. I tried the code presented as the example:

e = Exception('arg1', 'arg2')
e[1]

and found that it is not converted by 2to3. This fix is not mentioned neither in documentation, nor in the code of fix_except fixer. Maybe am I missing something?

ilya-palachev avatar Feb 17 '20 02:02 ilya-palachev

Found one more case: in A.22 it's said that there is no support parameter unpacking in 2to3. But there is one: https://docs.python.org/2/library/2to3.html#2to3fixer-tuple_params

ilya-palachev avatar Feb 17 '20 06:02 ilya-palachev