[pypy-svn] r61850 - pypy/trunk/pypy/module/_locale

jlg at codespeak.net jlg at codespeak.net
Fri Feb 13 20:50:35 CET 2009


Author: jlg
Date: Fri Feb 13 20:50:34 2009
New Revision: 61850

Added:
   pypy/trunk/pypy/module/_locale/app_locale.py
Log:
(getxsick, jlg) forgoten file

Added: pypy/trunk/pypy/module/_locale/app_locale.py
==============================================================================
--- (empty file)
+++ pypy/trunk/pypy/module/_locale/app_locale.py	Fri Feb 13 20:50:34 2009
@@ -0,0 +1,34 @@
+
+class Error(Exception):
+    pass
+
+def _fixup_ulcase():
+    import string
+
+    # create uppercase map string
+    ul = []
+    for c in xrange(256):
+        c = chr(c)
+        if c.isupper():
+            ul.append(c)
+    ul = ''.join(ul)
+    string.uppercase = ul
+
+    # create lowercase string
+    ul = []
+    for c in xrange(256):
+        c = chr(c)
+        if c.islower():
+            ul.append(c)
+    ul = ''.join(ul)
+    string.lowercase = ul
+
+    # create letters string
+    ul = []
+    for c in xrange(256):
+        c = chr(c)
+        if c.isalpha():
+            ul.append(c)
+    ul = ''.join(ul)
+    string.letters = ul
+



More information about the Pypy-commit mailing list