[pypy-svn] r66221 - in pypy/branch/parser-compiler/pypy/interpreter/astcompiler: . test
benjamin at codespeak.net
benjamin at codespeak.net
Tue Jul 14 23:11:23 CEST 2009
Author: benjamin
Date: Tue Jul 14 23:11:22 2009
New Revision: 66221
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/symtable.py
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_symtable.py
Log:
fix error for an exec not in a function
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/symtable.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/symtable.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/symtable.py Tue Jul 14 23:11:22 2009
@@ -63,7 +63,7 @@
raise SyntaxError("return outside function", ret.lineno,
ret.col_offset)
- def note_bare_exec(self, exc):
+ def note_exec(self, exc):
pass
def note_import_star(self, imp):
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_symtable.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_symtable.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/test/test_symtable.py Tue Jul 14 23:11:22 2009
@@ -263,6 +263,7 @@
assert exc.msg == error + " contains a nested function with free variables"
def test_exec(self):
+ self.mod_scope("exec 'hi'")
scp = self.func_scope("def f(): exec 'hi'")
assert not scp.optimized
assert isinstance(scp.bare_exec, ast.Exec)
More information about the Pypy-commit
mailing list