mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-44142: drop redundant parantheses when unparsing tuples as assignment targets (GH-26156)
This commit is contained in:
parent
1a08c5ac49
commit
51cef8be8c
4 changed files with 47 additions and 4 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue