Author: Matti Picus <[email protected]>
Branch: py3.6
Changeset: r96092:43e56c60e223
Date: 2019-02-19 13:18 +0200
http://bitbucket.org/pypy/pypy/changeset/43e56c60e223/
Log: fix formatting, merge repititions
diff --git a/pypy/interpreter/unicodehelper.py
b/pypy/interpreter/unicodehelper.py
--- a/pypy/interpreter/unicodehelper.py
+++ b/pypy/interpreter/unicodehelper.py
@@ -64,11 +64,6 @@
slen = len(bytes)
uni, lgt = runicode.str_decode_mbcs(bytes, slen, 'strict', final=True,
errorhandler=errorhandler, force_ignore=False)
-
- utf8 = uni.encode('utf-8')
-
- utf8 = uni.encode('utf-8')
-
utf8 = uni.encode('utf-8')
elif 0 and _MACOSX:
bytes = space.bytes_w(w_string)
@@ -242,7 +237,7 @@
pos = end
# Try to get collect surrogates in one pass
# XXX do we care about performance in this case?
- # XXX should this loop for more than one pair?
+ # XXX should this loop for more than one pair?
delta = 1
uchr = rutf8.codepoint_at_pos(s, pos)
if 0xD800 <= uchr <= 0xDBFF:
@@ -250,7 +245,7 @@
if pos < size:
uchr = rutf8.codepoint_at_pos(s, pos)
if 0xDC00 <= uchr <= 0xDFFF:
- delta += 1
+ delta += 1
res, newindex, rettype = errorhandler(errors, 'utf8',
'surrogates not allowed', s, upos, upos + delta)
if rettype == 'u':
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit