[pypy-svn] r26243 - pypy/dist/pypy/translator/cl

sanxiyn at codespeak.net sanxiyn at codespeak.net
Mon Apr 24 11:01:53 CEST 2006


Author: sanxiyn
Date: Mon Apr 24 11:01:51 2006
New Revision: 26243

Modified:
   pypy/dist/pypy/translator/cl/buildcl.py
Log:
Use isdigit() string method in buildcl


Modified: pypy/dist/pypy/translator/cl/buildcl.py
==============================================================================
--- pypy/dist/pypy/translator/cl/buildcl.py	(original)
+++ pypy/dist/pypy/translator/cl/buildcl.py	Mon Apr 24 11:01:51 2006
@@ -47,7 +47,6 @@
     lines = [ line for line in lines if line and not line.startswith(';') ]
     assert len(lines) == 1
     s = lines[0]
-    import string
     s = s.strip()
     if s == "T":
         return True
@@ -55,7 +54,7 @@
         return False
     elif s[0] == '"':
         return s[1:-1]
-    elif s.strip(string.digits) == '':
+    elif s.isdigit():
         return int(s)
     else:
         return Literal(s)



More information about the Pypy-commit mailing list