Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r64859:391ba71b1425
Date: 2013-06-11 17:14 -0700
http://bitbucket.org/pypy/pypy/changeset/391ba71b1425/

Log:    simplify

diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -379,7 +379,6 @@
     return tuple(parts), tuple(formats)
 
 def get_operrcls2(valuefmt):
-    from rpython.rlib.runicode import str_decode_utf_8
     valuefmt = valuefmt.decode('ascii')
     strings, formats = decompose_valuefmt(valuefmt)
     assert len(strings) == len(formats) + 1
@@ -407,8 +406,7 @@
                     if fmt == 'd':
                         result = str(value).decode('ascii')
                     elif fmt == '8':
-                        result, _ = str_decode_utf_8(value, len(value),
-                                                     'strict')
+                        result = value.decode('utf-8')
                     elif fmt == 'R':
                         result = space.unicode_w(space.repr(value))
                     elif fmt in 'NT':
@@ -440,7 +438,7 @@
 
     Supports the standard %s and %d formats, plus the following:
 
-    %8 - The result of arg.decode('utf-8', 'strict')
+    %8 - The result of arg.decode('utf-8')
     %N - The result of w_arg.getname(space)
     %R - The result of space.unicode_w(space.repr(w_arg))
     %T - The result of space.type(w_arg).getname(space)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to