Author: Armin Rigo <ar...@tunes.org> Branch: py3.5 Changeset: r89874:5699b5075b86 Date: 2017-02-01 10:52 +0100 http://bitbucket.org/pypy/pypy/changeset/5699b5075b86/
Log: translation fix diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py --- a/pypy/objspace/std/tupleobject.py +++ b/pypy/objspace/std/tupleobject.py @@ -196,7 +196,10 @@ items = self.tolist() length = len(items) start, stop, step, slicelength = w_index.indices4(space, length) - if step == 1: + if slicelength == 0: + subitems = [] + elif step == 1: + assert 0 <= start <= stop subitems = items[start:stop] else: subitems = self._getslice_advanced(items, start, step, slicelength) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit