[pypy-svn] r13714 - pypy/branch/pypy-translation-snapshot/interpreter
mwh at codespeak.net
mwh at codespeak.net
Thu Jun 23 15:35:27 CEST 2005
Author: mwh
Date: Thu Jun 23 15:35:26 2005
New Revision: 13714
Modified:
pypy/branch/pypy-translation-snapshot/interpreter/nestedscope.py
Log:
merge fix to pypy-translation-snapshot
Modified: pypy/branch/pypy-translation-snapshot/interpreter/nestedscope.py
==============================================================================
--- pypy/branch/pypy-translation-snapshot/interpreter/nestedscope.py (original)
+++ pypy/branch/pypy-translation-snapshot/interpreter/nestedscope.py Thu Jun 23 15:35:26 2005
@@ -140,13 +140,13 @@
except ValueError:
varname = f.getfreevarname(varindex)
if f.iscellvar(varindex):
- message = "local variable '%s' referenced before assignment"
+ message = "local variable '%s' referenced before assignment"%varname
w_exc_type = f.space.w_UnboundLocalError
else:
message = ("free variable '%s' referenced before assignment"
- " in enclosing scope")
+ " in enclosing scope"%varname)
w_exc_type = f.space.w_NameError
- raise OperationError(w_exc_type, f.space.wrap(message % varname))
+ raise OperationError(w_exc_type, f.space.wrap(message))
else:
f.valuestack.push(w_value)
More information about the Pypy-commit
mailing list