[pypy-commit] pypy py3k: no longer needed in py3k
pjenvey
noreply at buildbot.pypy.org
Tue Nov 8 05:47:25 CET 2011
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r48897:9dc079b3cf94
Date: 2011-11-07 20:46 -0800
http://bitbucket.org/pypy/pypy/changeset/9dc079b3cf94/
Log: no longer needed in py3k
diff --git a/pypy/module/_locale/interp_locale.py b/pypy/module/_locale/interp_locale.py
--- a/pypy/module/_locale/interp_locale.py
+++ b/pypy/module/_locale/interp_locale.py
@@ -19,31 +19,6 @@
return OperationError(space.gettypeobject(W_Error.typedef),
space.wrap(e.message))
-def _fixup_ulcase(space):
- stringmod = space.call_function(
- space.getattr(space.getbuiltinmodule('builtins'),
- space.wrap('__import__')), space.wrap('string'))
- # create uppercase map string
- ul = []
- for c in xrange(256):
- if rlocale.isupper(c):
- ul.append(chr(c))
- space.setattr(stringmod, space.wrap('uppercase'), space.wrap(''.join(ul)))
-
- # create lowercase string
- ul = []
- for c in xrange(256):
- if rlocale.islower(c):
- ul.append(chr(c))
- space.setattr(stringmod, space.wrap('lowercase'), space.wrap(''.join(ul)))
-
- # create letters string
- ul = []
- for c in xrange(256):
- if rlocale.isalpha(c):
- ul.append(chr(c))
- space.setattr(stringmod, space.wrap('letters'), space.wrap(''.join(ul)))
-
@unwrap_spec(category=int)
def setlocale(space, category, w_locale=None):
"(integer,string=None) -> string. Activates/queries locale processing."
@@ -56,11 +31,6 @@
result = rlocale.setlocale(category, locale)
except rlocale.LocaleError, e:
raise rewrap_error(space, e)
-
- # record changes to LC_CTYPE
- if category in (rlocale.LC_CTYPE, rlocale.LC_ALL):
- _fixup_ulcase(space)
-
return space.wrap(result)
def _w_copy_grouping(space, text):
More information about the pypy-commit
mailing list