summaryrefslogtreecommitdiff
path: root/Lib/compiler/transformer.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-27 17:43:02 +0000
committerGeorg Brandl <georg@python.org>2007-01-27 17:43:02 +0000
commitab49684f550ce6b12614b8a329f4d280e20e1277 (patch)
treef813125ca6d4bbda770e4e3566e470069f917f09 /Lib/compiler/transformer.py
parent7a7cbae77b417b855bdfe5f7c536893cbefcbb1d (diff)
downloadcpython-git-ab49684f550ce6b12614b8a329f4d280e20e1277.tar.gz
Patch #1638243: the compiler package is now able to correctly compile
a with statement; previously, executing code containing a with statement compiled by the compiler package crashed the interpreter.
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r--Lib/compiler/transformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index a16dc553c4..ac23ad18a9 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -960,7 +960,7 @@ class Transformer:
if nodelist[2][0] == token.COLON:
var = None
else:
- var = self.com_node(nodelist[2])
+ var = self.com_assign(nodelist[2][2], OP_ASSIGN)
return With(expr, var, body, lineno=nodelist[0][2])
def com_with_var(self, nodelist):