You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Grammar rule for 3.6 with .. return
This commit is contained in:
Binary file not shown.
@@ -120,6 +120,8 @@ class Python36Parser(Python35Parser):
|
||||
rules_str = """
|
||||
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
|
||||
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
|
||||
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt COME_FROM_WITH
|
||||
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
|
||||
|
||||
# Removes POP_BLOCK LOAD_CONST from 3.6-
|
||||
withasstmt ::= expr SETUP_WITH store suite_stmts_opt COME_FROM_WITH
|
||||
|
@@ -628,8 +628,8 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
assert tup == 'tuple'
|
||||
self.call36_tuple(tup)
|
||||
expr = node[2]
|
||||
assert expr == 'expr'
|
||||
if tup[0].attr > 0:
|
||||
if len(tup) > 0:
|
||||
# if tup[0].attr > 0:
|
||||
self.write(', ')
|
||||
self.write('**')
|
||||
self.preorder(expr)
|
||||
|
Reference in New Issue
Block a user