[pypy-svn] r61436 - in pypy/trunk/pypy/interpreter/astcompiler: . test

fijal at codespeak.net fijal at codespeak.net
Thu Jan 29 00:08:59 CET 2009


Author: fijal
Date: Thu Jan 29 00:08:59 2009
New Revision: 61436

Modified:
   pypy/trunk/pypy/interpreter/astcompiler/pycodegen.py
   pypy/trunk/pypy/interpreter/astcompiler/test/test_compiler.py
Log:
provide a line number


Modified: pypy/trunk/pypy/interpreter/astcompiler/pycodegen.py
==============================================================================
--- pypy/trunk/pypy/interpreter/astcompiler/pycodegen.py	(original)
+++ pypy/trunk/pypy/interpreter/astcompiler/pycodegen.py	Thu Jan 29 00:08:59 2009
@@ -984,7 +984,8 @@
 
     def _visitAssSequence(self, node, op='UNPACK_SEQUENCE'):
         if not node.nodes:
-            raise SyntaxError('Cannot assign to empty sequence')
+            raise SyntaxError('Cannot assign to empty sequence',
+                              node.lineno)
         if findOp(node) != OP_DELETE:
             self.emitop_int(op, len(node.nodes))
         for child in node.nodes:

Modified: pypy/trunk/pypy/interpreter/astcompiler/test/test_compiler.py
==============================================================================
--- pypy/trunk/pypy/interpreter/astcompiler/test/test_compiler.py	(original)
+++ pypy/trunk/pypy/interpreter/astcompiler/test/test_compiler.py	Thu Jan 29 00:08:59 2009
@@ -680,3 +680,5 @@
            pass
         """
         py.test.raises(SyntaxError, self.simple_test, source, None, None)
+
+    



More information about the Pypy-commit mailing list