[pypy-svn] r48725 - pypy/branch/ropes-unicode/pypy/objspace/std
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri Nov 16 00:38:34 CET 2007
Author: cfbolz
Date: Fri Nov 16 00:38:33 2007
New Revision: 48725
Modified:
pypy/branch/ropes-unicode/pypy/objspace/std/ropeobject.py
Log:
share some code with normal strings
Modified: pypy/branch/ropes-unicode/pypy/objspace/std/ropeobject.py
==============================================================================
--- pypy/branch/ropes-unicode/pypy/objspace/std/ropeobject.py (original)
+++ pypy/branch/ropes-unicode/pypy/objspace/std/ropeobject.py Fri Nov 16 00:38:33 2007
@@ -11,7 +11,8 @@
from pypy.objspace.std.stringtype import wrapchar
from pypy.objspace.std import rope
-from pypy.objspace.std.stringobject import mod__String_ANY as mod__Rope_ANY
+from pypy.objspace.std.stringobject import mod__String_ANY as mod__Rope_ANY,\
+ _upper, _lower
class W_RopeObject(W_Object):
from pypy.objspace.std.stringtype import str_typedef as typedef
@@ -66,20 +67,6 @@
return space.w_True
_is_generic._annspecialcase_ = "specialize:arg(2)"
-def _upper(ch):
- if ch.islower():
- o = ord(ch) - 32
- return chr(o)
- else:
- return ch
-
-def _lower(ch):
- if ch.isupper():
- o = ord(ch) + 32
- return chr(o)
- else:
- return ch
-
_isspace = lambda c: c.isspace()
_isdigit = lambda c: c.isdigit()
_isalpha = lambda c: c.isalpha()
More information about the Pypy-commit
mailing list