Author: Lukas Diekmann <[email protected]>
Branch: list-strategies
Changeset: r47482:f3df821d227f
Date: 2011-03-22 11:43 +0100
http://bitbucket.org/pypy/pypy/changeset/f3df821d227f/
Log: index is non-negative because of get_positive_index in
list_insert_List_ANY_ANY
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
@@ -456,6 +456,7 @@
w_list.append(w_item)
def insert(self, w_list, index, w_item):
+ assert index >= 0
l = self.cast_from_void_star(w_list.lstorage)
if self.is_correct_type(w_item):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit