[pypy-commit] pypy length-hint: extend now takes any object

pjenvey noreply at buildbot.pypy.org
Tue Sep 25 22:11:45 CEST 2012


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: length-hint
Changeset: r57585:9b41167a4159
Date: 2012-09-25 13:11 -0700
http://bitbucket.org/pypy/pypy/changeset/9b41167a4159/

Log:	extend now takes any object

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
@@ -287,9 +287,9 @@
         index not."""
         self.strategy.insert(self, index, w_item)
 
-    def extend(self, items_w):
+    def extend(self, w_any):
         """Appends the given list of wrapped items."""
-        self.strategy.extend(self, items_w)
+        self.strategy.extend(self, w_any)
 
     def reverse(self):
         """Reverses the list."""
@@ -703,9 +703,9 @@
         self.switch_to_integer_strategy(w_list)
         w_list.insert(index, w_item)
 
-    def extend(self, w_list, items_w):
+    def extend(self, w_list, w_any):
         self.switch_to_integer_strategy(w_list)
-        w_list.extend(items_w)
+        w_list.extend(w_any)
 
     def reverse(self, w_list):
         self.switch_to_integer_strategy(w_list)
@@ -1332,8 +1332,8 @@
     w_list.append(w_any)
     return space.w_None
 
-def list_extend__List_ANY(space, w_list, w_other):
-    w_list.extend(w_other)
+def list_extend__List_ANY(space, w_list, w_any):
+    w_list.extend(w_any)
     return space.w_None
 
 # default of w_idx is space.w_None (see listtype.py)


More information about the pypy-commit mailing list