From 98c3b85bc4b64307fc12b53210f941c6458bccb5 Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Sat, 7 Feb 2009 00:13:39 +0000 Subject: Make names generated for 'with' variables match the built-in compiler. --- Lib/compiler/pycodegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 808f51f..e7ce1a9 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -814,8 +814,8 @@ class CodeGenerator: def visitWith(self, node): body = self.newBlock() final = self.newBlock() - valuevar = "$value%d" % self.__with_count self.__with_count += 1 + valuevar = "_[%d]" % self.__with_count self.set_lineno(node) self.visit(node.expr) self.emit('DUP_TOP') -- cgit v0.12