[pypy-svn] r16460 - pypy/dist/pypy/interpreter/stablecompiler
hpk at codespeak.net
hpk at codespeak.net
Thu Aug 25 12:46:57 CEST 2005
Author: hpk
Date: Thu Aug 25 12:46:56 2005
New Revision: 16460
Modified:
pypy/dist/pypy/interpreter/stablecompiler/pycodegen.py
Log:
fix to the python compiler: raise SyntaxError instead of issueing DELETE_DEREF
Modified: pypy/dist/pypy/interpreter/stablecompiler/pycodegen.py
==============================================================================
--- pypy/dist/pypy/interpreter/stablecompiler/pycodegen.py (original)
+++ pypy/dist/pypy/interpreter/stablecompiler/pycodegen.py Thu Aug 25 12:46:56 2005
@@ -269,6 +269,10 @@
self._nameOp('LOAD', name)
def delName(self, name):
+ scope = self.scope.check_name(name)
+ if scope == SC_CELL:
+ raise SyntaxError("can not delete variable '%s' "
+ "referenced in nested scope" % name)
self._nameOp('DELETE', name)
def _nameOp(self, prefix, name):
More information about the Pypy-commit
mailing list