]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-38870: Don't omit parenthesis when unparsing a slice in ast.unparse
authorBatuhan Taskaya <batuhanosmantaskaya@gmail.com>
Mon, 18 May 2020 20:48:49 +0000 (23:48 +0300)
committerGitHub <noreply@github.com>
Mon, 18 May 2020 20:48:49 +0000 (21:48 +0100)
commitc102a148256b00b7d48c51a1a97df19042e603de
tree7bc9b18b124fdcceeb28ce56eff2fec81e2188ed
parent75b863aa97016c6813709eb620c43295f84dd51f
bpo-38870: Don't omit parenthesis when unparsing a slice in ast.unparse

When unparsing a non-empty tuple, the parentheses can be safely
omitted if there aren't any elements that explicitly require them (such as starred expressions).
Lib/ast.py
Lib/test/test_unparse.py