You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Set precedence better for list comprehensions.
This commit is contained in:
@@ -999,6 +999,7 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
while (len(ast) == 1
|
while (len(ast) == 1
|
||||||
or (ast in ('sstmt', 'return')
|
or (ast in ('sstmt', 'return')
|
||||||
and ast[-1] in ('RETURN_LAST', 'RETURN_VALUE'))):
|
and ast[-1] in ('RETURN_LAST', 'RETURN_VALUE'))):
|
||||||
|
self.prec=100
|
||||||
ast = ast[0]
|
ast = ast[0]
|
||||||
|
|
||||||
store = None
|
store = None
|
||||||
@@ -1105,6 +1106,7 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
while (len(ast) == 1
|
while (len(ast) == 1
|
||||||
or (ast in ('sstmt', 'return')
|
or (ast in ('sstmt', 'return')
|
||||||
and ast[-1] in ('RETURN_LAST', 'RETURN_VALUE'))):
|
and ast[-1] in ('RETURN_LAST', 'RETURN_VALUE'))):
|
||||||
|
self.prec=100
|
||||||
ast = ast[0]
|
ast = ast[0]
|
||||||
|
|
||||||
n = ast[1]
|
n = ast[1]
|
||||||
|
Reference in New Issue
Block a user