You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
mklambda -> lambda_body matches Python AST better
Note: we can't use "lambda" since that is a reserved word
This commit is contained in:
@@ -569,7 +569,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
|
||||
def n_expr(self, node):
|
||||
first_child = node[0]
|
||||
if first_child == "_mklambda" and self.in_format_string:
|
||||
if first_child == "_lambda_body" and self.in_format_string:
|
||||
p = -2
|
||||
else:
|
||||
p = self.prec
|
||||
@@ -955,7 +955,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.println(lines[-1], quote)
|
||||
self.prune()
|
||||
|
||||
def n_mklambda(self, node):
|
||||
def n_lambda_body(self, node):
|
||||
self.make_function(node, is_lambda=True, code_node=node[-2])
|
||||
self.prune() # stop recursing
|
||||
|
||||
|
Reference in New Issue
Block a user