[pypy-svn] r39720 - pypy/dist/pypy/objspace/std

gbrandl at codespeak.net gbrandl at codespeak.net
Fri Mar 2 17:16:57 CET 2007


Author: gbrandl
Date: Fri Mar  2 17:16:55 2007
New Revision: 39720

Modified:
   pypy/dist/pypy/objspace/std/listmultiobject.py
   pypy/dist/pypy/objspace/std/smartresizablelist.py
Log:
Fix in strlist.getitem_slice_step.


Modified: pypy/dist/pypy/objspace/std/listmultiobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listmultiobject.py	(original)
+++ pypy/dist/pypy/objspace/std/listmultiobject.py	Fri Mar  2 17:16:55 2007
@@ -337,7 +337,7 @@
         assert 0 <= start < len(self.strlist)
         assert 0 <= stop < len(self.strlist)
         assert slicelength > 0
-        res = [0] * slicelength
+        res = [""] * slicelength
         for i in range(slicelength):
             res[i] = self.strlist[start]
             start += step

Modified: pypy/dist/pypy/objspace/std/smartresizablelist.py
==============================================================================
--- pypy/dist/pypy/objspace/std/smartresizablelist.py	(original)
+++ pypy/dist/pypy/objspace/std/smartresizablelist.py	Fri Mar  2 17:16:55 2007
@@ -159,7 +159,6 @@
         self.data_blocks[a][b] = value
 
     def getitem_slice(self, start, stop):
-        # XXX make default implementation?
         l = stop - start
         result = SmartResizableListImplementation(self.space)
         result.grow(l)



More information about the Pypy-commit mailing list