mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Make or_test similar to test, not testlist.
This commit is contained in:
parent
415ed937c2
commit
59977a677c
1 changed files with 2 additions and 1 deletions
|
@ -945,7 +945,7 @@ class Transformer:
|
|||
# loop to avoid trivial recursion
|
||||
while 1:
|
||||
t = node[0]
|
||||
if t in (symbol.exprlist, symbol.testlist, symbol.testlist_safe, symbol.or_test, symbol.testlist_gexp):
|
||||
if t in (symbol.exprlist, symbol.testlist, symbol.testlist_safe, symbol.testlist_gexp):
|
||||
if len(node) > 2:
|
||||
return self.com_assign_tuple(node, assigning)
|
||||
node = node[1]
|
||||
|
@ -1416,6 +1416,7 @@ if hasattr(symbol, 'yield_expr'):
|
|||
|
||||
_assign_types = [
|
||||
symbol.test,
|
||||
symbol.or_test,
|
||||
symbol.and_test,
|
||||
symbol.not_test,
|
||||
symbol.comparison,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue