[pypy-svn] r78327 - pypy/branch/fast-forward/pypy/interpreter/pyparser

afa at codespeak.net afa at codespeak.net
Tue Oct 26 23:48:13 CEST 2010


Author: afa
Date: Tue Oct 26 23:48:12 2010
New Revision: 78327

Modified:
   pypy/branch/fast-forward/pypy/interpreter/pyparser/pytokenizer.py
Log:
Use CPython error messages


Modified: pypy/branch/fast-forward/pypy/interpreter/pyparser/pytokenizer.py
==============================================================================
--- pypy/branch/fast-forward/pypy/interpreter/pyparser/pytokenizer.py	(original)
+++ pypy/branch/fast-forward/pypy/interpreter/pyparser/pytokenizer.py	Tue Oct 26 23:48:12 2010
@@ -92,8 +92,9 @@
 
         if contstr:
             if not line:
-                raise TokenError("EOF while scanning triple-quoted string",
-                                 line, lnum-1, 0, token_list)
+                raise TokenError(
+                    "EOF while scanning triple-quoted string literal",
+                    line, lnum-1, 0, token_list)
             endmatch = endDFA.recognize(line)
             if endmatch >= 0:
                 pos = end = endmatch
@@ -229,7 +230,7 @@
                 if start < 0:
                     start = pos
                 if start<max and line[start] in single_quoted:
-                    raise TokenError("EOL while scanning single-quoted string",
+                    raise TokenError("EOL while scanning string literal",
                              line, lnum, start, token_list)
                 tok = (tokens.ERRORTOKEN, line[pos], lnum, pos, line)
                 token_list.append(tok)



More information about the Pypy-commit mailing list