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

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Feb 8 20:53:10 CET 2007


Author: cfbolz
Date: Thu Feb  8 20:53:09 2007
New Revision: 38205

Modified:
   pypy/dist/pypy/objspace/std/strsliceobject.py
Log:
oops oops oops, bad plan: don't create a copy of the string again after we have
forced the string slice ones.


Modified: pypy/dist/pypy/objspace/std/strsliceobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/strsliceobject.py	(original)
+++ pypy/dist/pypy/objspace/std/strsliceobject.py	Thu Feb  8 20:53:09 2007
@@ -15,6 +15,8 @@
         w_self.stop = stop
 
     def force(w_self):
+        if w_self.start == 0 and w_self.stop == len(w_self.str):
+            return w_self.str
         str = w_self.str[w_self.start:w_self.stop]
         w_self.str = str
         w_self.start = 0



More information about the Pypy-commit mailing list