mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix SF bug [ 788011 ] compiler.compileFile fails on csv.py
Bug fix candidate.
This commit is contained in:
parent
4651f53949
commit
ead21f596c
1 changed files with 6 additions and 1 deletions
|
@ -220,7 +220,12 @@ class SymbolVisitor:
|
|||
self.visit(node.code, scope)
|
||||
self.handle_free_vars(scope, parent)
|
||||
|
||||
def visitLambda(self, node, parent):
|
||||
def visitLambda(self, node, parent, assign=0):
|
||||
# Lambda is an expression, so it could appear in an expression
|
||||
# context where assign is passed. The transformer should catch
|
||||
# any code that has a lambda on the left-hand side.
|
||||
assert not assign
|
||||
|
||||
for n in node.defaults:
|
||||
self.visit(n, parent)
|
||||
scope = LambdaScope(self.module, self.klass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue