[pypy-svn] r75603 - in pypy/branch/fast-forward/pypy/interpreter/astcompiler: . test

benjamin at codespeak.net benjamin at codespeak.net
Fri Jun 25 17:31:29 CEST 2010


Author: benjamin
Date: Fri Jun 25 17:31:27 2010
New Revision: 75603

Modified:
   pypy/branch/fast-forward/pypy/interpreter/astcompiler/symtable.py
   pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_symtable.py
Log:
remove 'both'

Modified: pypy/branch/fast-forward/pypy/interpreter/astcompiler/symtable.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/astcompiler/symtable.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/astcompiler/symtable.py	Fri Jun 25 17:31:27 2010
@@ -107,7 +107,7 @@
         """Decide on the scope of a name."""
         if flags & SYM_GLOBAL:
             if flags & SYM_PARAM:
-                err = "name '%s' is both local and global" % (name,)
+                err = "name '%s' is local and global" % (name,)
                 raise SyntaxError(err, self.lineno, self.col_offset)
             self.symbols[name] = SCOPE_GLOBAL_EXPLICIT
             globs[name] = None

Modified: pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_symtable.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_symtable.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/astcompiler/test/test_symtable.py	Fri Jun 25 17:31:27 2010
@@ -269,7 +269,7 @@
         assert xscp.lookup("y") == symtable.SCOPE_GLOBAL_EXPLICIT
         assert zscp.lookup("y") == symtable.SCOPE_FREE
         exc = py.test.raises(SyntaxError, self.func_scope, input).value
-        assert exc.msg == "name 'x' is both local and global"
+        assert exc.msg == "name 'x' is local and global"
 
     def test_optimization(self):
         assert not self.mod_scope("").can_be_optimized



More information about the Pypy-commit mailing list