[pypy-svn] r38446 - in pypy/dist/pypy: module/unicodedata objspace/std

arigo at codespeak.net arigo at codespeak.net
Sun Feb 11 11:52:44 CET 2007


Author: arigo
Date: Sun Feb 11 11:52:41 2007
New Revision: 38446

Modified:
   pypy/dist/pypy/module/unicodedata/generate_unicodedb.py
   pypy/dist/pypy/module/unicodedata/unicodedb_3_2_0.py
   pypy/dist/pypy/module/unicodedata/unicodedb_4_1_0.py
   pypy/dist/pypy/module/unicodedata/unicodedb_5_0_0.py
   pypy/dist/pypy/objspace/std/unicodeobject.py
Log:
Typo in the function name isalnum().
Let's use it from unicodeobject.py.


Modified: pypy/dist/pypy/module/unicodedata/generate_unicodedb.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/generate_unicodedb.py	(original)
+++ pypy/dist/pypy/module/unicodedata/generate_unicodedb.py	Sun Feb 11 11:52:41 2007
@@ -301,7 +301,7 @@
     print >> outfile, 'def isnumeric(code): return _get_record(code)[3] & %d != 0'% IS_NUMERIC
     print >> outfile, 'def isdigit(code): return _get_record(code)[3] & %d != 0'% IS_DIGIT
     print >> outfile, 'def isdecimal(code): return _get_record(code)[3] & %d != 0'% IS_DECIMAL
-    print >> outfile, 'def isalunm(code): return _get_record(code)[3] & %d != 0'% (IS_ALPHA | IS_NUMERIC)
+    print >> outfile, 'def isalnum(code): return _get_record(code)[3] & %d != 0'% (IS_ALPHA | IS_NUMERIC)
     print >> outfile, 'def isupper(code): return _get_record(code)[3] & %d != 0'% IS_UPPER
     print >> outfile, 'def istitle(code): return _get_record(code)[3] & %d != 0'% IS_TITLE
     print >> outfile, 'def islower(code): return _get_record(code)[3] & %d != 0'% IS_LOWER

Modified: pypy/dist/pypy/module/unicodedata/unicodedb_3_2_0.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/unicodedb_3_2_0.py	(original)
+++ pypy/dist/pypy/module/unicodedata/unicodedb_3_2_0.py	Sun Feb 11 11:52:41 2007
@@ -14539,7 +14539,7 @@
 def isnumeric(code): return _get_record(code)[3] & 64 != 0
 def isdigit(code): return _get_record(code)[3] & 128 != 0
 def isdecimal(code): return _get_record(code)[3] & 256 != 0
-def isalunm(code): return _get_record(code)[3] & 66 != 0
+def isalnum(code): return _get_record(code)[3] & 66 != 0
 def isupper(code): return _get_record(code)[3] & 8 != 0
 def istitle(code): return _get_record(code)[3] & 16 != 0
 def islower(code): return _get_record(code)[3] & 32 != 0

Modified: pypy/dist/pypy/module/unicodedata/unicodedb_4_1_0.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/unicodedb_4_1_0.py	(original)
+++ pypy/dist/pypy/module/unicodedata/unicodedb_4_1_0.py	Sun Feb 11 11:52:41 2007
@@ -17139,7 +17139,7 @@
 def isnumeric(code): return _get_record(code)[3] & 64 != 0
 def isdigit(code): return _get_record(code)[3] & 128 != 0
 def isdecimal(code): return _get_record(code)[3] & 256 != 0
-def isalunm(code): return _get_record(code)[3] & 66 != 0
+def isalnum(code): return _get_record(code)[3] & 66 != 0
 def isupper(code): return _get_record(code)[3] & 8 != 0
 def istitle(code): return _get_record(code)[3] & 16 != 0
 def islower(code): return _get_record(code)[3] & 32 != 0

Modified: pypy/dist/pypy/module/unicodedata/unicodedb_5_0_0.py
==============================================================================
--- pypy/dist/pypy/module/unicodedata/unicodedb_5_0_0.py	(original)
+++ pypy/dist/pypy/module/unicodedata/unicodedb_5_0_0.py	Sun Feb 11 11:52:41 2007
@@ -18528,7 +18528,7 @@
 def isnumeric(code): return _get_record(code)[3] & 64 != 0
 def isdigit(code): return _get_record(code)[3] & 128 != 0
 def isdecimal(code): return _get_record(code)[3] & 256 != 0
-def isalunm(code): return _get_record(code)[3] & 66 != 0
+def isalnum(code): return _get_record(code)[3] & 66 != 0
 def isupper(code): return _get_record(code)[3] & 8 != 0
 def istitle(code): return _get_record(code)[3] & 16 != 0
 def islower(code): return _get_record(code)[3] & 32 != 0

Modified: pypy/dist/pypy/objspace/std/unicodeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/unicodeobject.py	(original)
+++ pypy/dist/pypy/objspace/std/unicodeobject.py	Sun Feb 11 11:52:41 2007
@@ -285,8 +285,7 @@
     if len(w_unicode._value) == 0:
         return space.w_False
     for uchar in w_unicode._value:
-        if not (unicodedb.isalpha(ord(uchar)) or
-                unicodedb.isnumeric(ord(uchar))):
+        if not unicodedb.isalnum(ord(uchar)):
             return space.w_False
     return space.w_True
 



More information about the Pypy-commit mailing list