[pypy-svn] r29687 - pypy/dist/pypy/objspace/std
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Jul 6 17:12:26 CEST 2006
Author: cfbolz
Date: Thu Jul 6 17:12:23 2006
New Revision: 29687
Modified:
pypy/dist/pypy/objspace/std/stringobject.py
Log:
(pzieschang, cfbolz): removed legacy code that was a good idea in the
pre-rtyper days: string addition was done in a very strange way
Modified: pypy/dist/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringobject.py (original)
+++ pypy/dist/pypy/objspace/std/stringobject.py Thu Jul 6 17:12:23 2006
@@ -890,12 +890,7 @@
def add__String_String(space, w_left, w_right):
right = w_right._value
left = w_left._value
- buf = [' '] * (len(left) + len(right))
- for i in range(len(left)):
- buf[i] = left[i]
- for i in range(len(right)):
- buf[i+len(left)] = right[i]
- return space.wrap("".join(buf))
+ return space.wrap(left + right)
def len__String(space, w_str):
return space.wrap(len(w_str._value))
More information about the Pypy-commit
mailing list