mklambda -> lambda_body matches Python AST better

Note: we can't use "lambda" since that is a reserved word
This commit is contained in:
rocky
2021-12-26 18:48:51 -05:00
parent 23551ea70f
commit 3234673422
12 changed files with 31 additions and 31 deletions

View File

@@ -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