Author: Manuel Jacob
Branch: remove-list-smm-2
Changeset: r64331:042f9a29ef0b
Date: 2013-05-19 17:35 +0200
http://bitbucket.org/pypy/pypy/changeset/042f9a29ef0b/

Log:    No need to return space.w_None.

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
@@ -547,7 +547,6 @@
     def descr_reverse(self, space):
         'L.reverse() -- reverse *IN PLACE*'
         self.reverse()
-        return space.w_None
 
     def descr_count(self, space, w_value):
         '''L.count(value) -> integer -- return number of
@@ -567,7 +566,6 @@
         length = self.length()
         index = get_positive_index(index, length)
         self.insert(index, w_value)
-        return space.w_None
 
     @unwrap_spec(index=int)
     def descr_pop(self, space, index=-1):
@@ -598,7 +596,6 @@
                                  space.wrap("list.remove(x): x not in list"))
         if i < self.length():  # otherwise list was mutated
             self.pop(i)
-        return space.w_None
 
     @unwrap_spec(w_start=WrappedDefault(0), w_stop=WrappedDefault(maxint))
     def descr_index(self, space, w_value, w_start, w_stop):
@@ -637,7 +634,7 @@
                     sorterclass = SimpleSort
                 else:
                     self.sort(reverse)
-                    return space.w_None
+                    return
 
         sorter = sorterclass(self.getitems(), self.length())
         sorter.space = space
@@ -687,8 +684,6 @@
             raise OperationError(space.w_ValueError,
                                  space.wrap("list modified during sort"))
 
-        return space.w_None
-
 
 class ListStrategy(object):
     sizehint = -1
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to