bpo-44142: drop redundant parantheses when unparsing tuples as assignment targets (GH-26156)

This commit is contained in:
Batuhan Taskaya 2021-05-16 16:33:22 +03:00 committed by GitHub
parent 1a08c5ac49
commit 51cef8be8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 4 deletions

View file

@ -702,7 +702,8 @@ class AST_Tests(unittest.TestCase):
def test_precedence_enum(self):
class _Precedence(enum.IntEnum):
"""Precedence table that originated from python grammar."""
TUPLE = enum.auto()
NAMED_EXPR = enum.auto() # <target> := <expr1>
TUPLE = enum.auto() # <expr1>, <expr2>
YIELD = enum.auto() # 'yield', 'yield from'
TEST = enum.auto() # 'if'-'else', 'lambda'
OR = enum.auto() # 'or'