diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-08-28 02:09:26 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-08-28 02:09:26 (GMT) |
commit | ead21f596ce9c3f3ed3349bdf872182a1e930ca0 (patch) | |
tree | 297a169514c9b5d893502b803753ebc7e4c6da1e /Lib/compiler | |
parent | 4651f53949b929f33a63e74232da1b26fe4a8d70 (diff) | |
download | cpython-ead21f596ce9c3f3ed3349bdf872182a1e930ca0.zip cpython-ead21f596ce9c3f3ed3349bdf872182a1e930ca0.tar.gz cpython-ead21f596ce9c3f3ed3349bdf872182a1e930ca0.tar.bz2 |
Fix SF bug [ 788011 ] compiler.compileFile fails on csv.py
Bug fix candidate.
Diffstat (limited to 'Lib/compiler')
-rw-r--r-- | Lib/compiler/symbols.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/compiler/symbols.py b/Lib/compiler/symbols.py index 9f47fa3..fa668f1 100644 --- a/Lib/compiler/symbols.py +++ b/Lib/compiler/symbols.py @@ -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) |