Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r68929:6dded87497b9
Date: 2014-01-24 16:55 -0800
http://bitbucket.org/pypy/pypy/changeset/6dded87497b9/
Log: kill
diff --git a/pypy/objspace/std/unicodeobject.py
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -17,9 +17,8 @@
from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.stringmethods import StringMethods
-__all__ = ['W_UnicodeObject', 'wrapunicode', 'plain_str2unicode',
- 'encode_object', 'decode_object', 'unicode_from_object',
- 'unicode_to_decimal_w']
+__all__ = ['W_UnicodeObject', 'wrapunicode', 'encode_object', 'decode_object',
+ 'unicode_from_object', 'unicode_to_decimal_w']
class W_UnicodeObject(W_Root):
@@ -442,26 +441,11 @@
descr_ljust = _fix_fillchar(StringMethods.descr_ljust)
descr_rjust = _fix_fillchar(StringMethods.descr_rjust)
+
def wrapunicode(space, uni):
return W_UnicodeObject(uni)
-def plain_str2unicode(space, s):
- try:
- return unicode(s)
- except UnicodeDecodeError:
- for i in range(len(s)):
- if ord(s[i]) > 127:
- raise OperationError(
- space.w_UnicodeDecodeError,
- space.newtuple([
- space.wrap('ascii'),
- space.wrap(s),
- space.wrap(i),
- space.wrap(i+1),
- space.wrap("ordinal not in range(128)")]))
- assert False, "unreachable"
-
def _isidentifier(u):
if not u:
return False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit