def visit_Lambda(self, t): t = self.generic_visit(t) result = Function('<lambda>', t.args, [ast.Return(t.body)]) return ast.copy_location(result, t)