[pypy-commit] pypy list-strategies: fixed inconsistency with storage of EmptyListStrategy

l.diekmann noreply at buildbot.pypy.org
Fri Sep 23 13:15:31 CEST 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47549:4a7827aa9695
Date: 2011-09-14 11:51 +0200
http://bitbucket.org/pypy/pypy/changeset/4a7827aa9695/

Log:	fixed inconsistency with storage of EmptyListStrategy

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
@@ -279,8 +279,7 @@
         return self.emptylist
 
     def getstorage_copy(self, w_list):
-        # XXX this is inconsistent with init_from_list_w, where the storage is None!
-        return self.erase(self.emptylist)
+        return self.erase(None)
 
     def append(self, w_list, w_item):
         # XXX this should be done by checking the type of the object directly


More information about the pypy-commit mailing list