Author: Manuel Jacob
Branch: remove-list-smm-2
Changeset: r64330:f9da31e273e3
Date: 2013-05-19 17:12 +0200
http://bitbucket.org/pypy/pypy/changeset/f9da31e273e3/

Log:    __mul__ and __rmul__ do the same.

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
@@ -444,7 +444,7 @@
             raise
         return self
 
-    def mul_list_times(self, space, w_times):
+    def descr_mul(self, space, w_times):
         try:
             times = space.getindex_w(w_times, space.w_OverflowError)
         except OperationError, e:
@@ -453,12 +453,6 @@
             raise
         return self.mul(times)
 
-    def descr_mul(self, space, w_times):
-        return self.mul_list_times(space, w_times)
-
-    def descr_rmul(self, space, w_times):
-        return self.mul_list_times(self.space, w_times)
-
     def descr_inplace_mul(self, space, w_times):
         try:
             times = space.getindex_w(w_times, space.w_OverflowError)
@@ -1723,7 +1717,7 @@
     __add__ = interp2app(W_ListObject.descr_add),
     __iadd__ = interp2app(W_ListObject.descr_inplace_add),
     __mul__ = interp2app(W_ListObject.descr_mul),
-    __rmul__ = interp2app(W_ListObject.descr_rmul),
+    __rmul__ = interp2app(W_ListObject.descr_mul),
     __imul__ = interp2app(W_ListObject.descr_inplace_mul),
 
     __getitem__ = interp2app(W_ListObject.descr_getitem),
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to