Author: fijal
Branch: unicode-utf8
Changeset: r92852:5ac470b3f3bb
Date: 2017-10-26 15:47 +0200
http://bitbucket.org/pypy/pypy/changeset/5ac470b3f3bb/
Log: fix rpython
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
@@ -797,7 +797,7 @@
pos = value.find(sub._utf8)
- if pos == -1:
+ if pos < 0:
return space.newtuple([self, self._empty(), self._empty()])
else:
lgt = rutf8.check_utf8(value, True, stop=pos)
@@ -815,7 +815,7 @@
pos = value.rfind(sub._utf8)
- if pos == -1:
+ if pos < 0:
return space.newtuple([self._empty(), self._empty(), self])
else:
lgt = rutf8.check_utf8(value, True, stop=pos)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit