Message363593
It was added to produce nicer output.
Currently:
>>> print(ast.unparse(ast.parse('a[i, j]')))
a[(i, j)]
With PR 9605:
>>> print(ast.unparse(ast.parse('a[i, j]')))
a[i, j]
The current code is not consistent with outputting parenthesis:
>>> print(ast.unparse(ast.parse('a[i:j, k]')))
a[i:j, k]
It also produces the same output for a[i:j] and a[i:j,] which have different AST and compiled to different bytecode (this is a bug).
>>> print(ast.unparse(ast.parse('a[i:j,]')))
a[i:j] |
|
Date |
User |
Action |
Args |
2020-03-07 13:35:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, brett.cannon, nascheme, ncoghlan, benjamin.peterson, veky, pablogsal, thautwarm, BTaskaya |
2020-03-07 13:35:00 | serhiy.storchaka | set | messageid: <1583588100.07.0.21873298237.issue34822@roundup.psfhosted.org> |
2020-03-07 13:35:00 | serhiy.storchaka | link | issue34822 messages |
2020-03-07 13:35:00 | serhiy.storchaka | create | |
|