[pypy-commit] pypy list-strategies: This index is non-negativ too

l.diekmann noreply at buildbot.pypy.org
Fri Sep 23 13:12:50 CEST 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47483:bc617ef7061f
Date: 2011-03-22 13:04 +0100
http://bitbucket.org/pypy/pypy/changeset/bc617ef7061f/

Log:	This index is non-negativ too

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -370,6 +370,7 @@
         w_list.setslice(start, step, slicelength, sequence_w)
 
     def insert(self, w_list, index, w_item):
+        assert index >= 0
         self.switch_to_integer_strategy(w_list)
         w_list.insert(index, w_item)
 


More information about the pypy-commit mailing list