Author: Lukas Diekmann <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit