[pypy-svn] r15306 - pypy/dist/pypy/interpreter/pyparser

arigo at codespeak.net arigo at codespeak.net
Thu Jul 28 23:59:23 CEST 2005


Author: arigo
Date: Thu Jul 28 23:59:20 2005
New Revision: 15306

Modified:
   pypy/dist/pypy/interpreter/pyparser/parsestring.py
Log:
str.isalpha() is not RPython.


Modified: pypy/dist/pypy/interpreter/pyparser/parsestring.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/parsestring.py	(original)
+++ pypy/dist/pypy/interpreter/pyparser/parsestring.py	Thu Jul 28 23:59:20 2005
@@ -14,7 +14,9 @@
     unicode = False
 
     # string decoration handling
-    if quote.isalpha() or quote == '_':
+    o = ord(quote)
+    isalpha = (o>=97 and o<=122) or (o>=65 and o<=90)
+    if isalpha or quote == '_':
         if quote == 'u' or quote == 'U':
             ps += 1
             quote = s[ps]



More information about the Pypy-commit mailing list