[pypy-svn] rev 716 - pypy/trunk/src/pypy/objspace/std

tismer at codespeak.net tismer at codespeak.net
Thu May 29 19:45:24 CEST 2003


Author: tismer
Date: Thu May 29 19:45:23 2003
New Revision: 716

Modified:
   pypy/trunk/src/pypy/objspace/std/listobject.py
Log:
list object deletion refined to clean the upper end of the array

Modified: pypy/trunk/src/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/listobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/listobject.py	Thu May 29 19:45:23 2003
@@ -335,9 +335,14 @@
         ihigh = w_list.ob_size
     items = w_list.ob_item
     d = ihigh-ilow
-    recycle = [items[i] for i in range(ilow, ihigh)]
+    # XXX this is done by CPython to hold the elements
+    # to be deleted. I have no idea how to express
+    # this here, but we need to be aware when we write
+    # a compiler.
+    # recycle = [items[i] for i in range(ilow, ihigh)]
     for i in range(ilow, w_list.ob_size - d):
         items[i] = items[i+d]
+        items[i+d] = None
     w_list.ob_size -= d
 
 # note that the default value will come back wrapped!!!


More information about the Pypy-commit mailing list