[pypy-commit] pypy py3k: Fix translation

amauryfa noreply at buildbot.pypy.org
Sun Dec 4 20:59:27 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r50154:d7e4343ce017
Date: 2011-12-04 20:58 +0100
http://bitbucket.org/pypy/pypy/changeset/d7e4343ce017/

Log:	Fix translation

diff --git a/pypy/objspace/std/stringobject.py b/pypy/objspace/std/stringobject.py
--- a/pypy/objspace/std/stringobject.py
+++ b/pypy/objspace/std/stringobject.py
@@ -274,8 +274,8 @@
     if bylen == 0:
         raise OperationError(space.w_ValueError, space.wrap("empty separator"))
 
+    start = 0
     if bylen == 1 and maxsplit < 0:
-        start = 0
         # fast path: uses str.rfind(character) and str.count(character)
         by = by[0]    # annotator hack: string -> char
         count = value.count(by)


More information about the pypy-commit mailing list