[pypy-svn] r50380 - pypy/branch/ghop-ropes-classes/pypy/rlib
vinogradov at codespeak.net
vinogradov at codespeak.net
Sun Jan 6 15:42:18 CET 2008
Author: vinogradov
Date: Sun Jan 6 15:42:18 2008
New Revision: 50380
Modified:
pypy/branch/ghop-ropes-classes/pypy/rlib/ropewrapper.py
Log:
Romeve usage of flatten_string/unicode from Rope __add__ algorithm
Modified: pypy/branch/ghop-ropes-classes/pypy/rlib/ropewrapper.py
==============================================================================
--- pypy/branch/ghop-ropes-classes/pypy/rlib/ropewrapper.py (original)
+++ pypy/branch/ghop-ropes-classes/pypy/rlib/ropewrapper.py Sun Jan 6 15:42:18 2008
@@ -26,17 +26,17 @@
if isinstance(self, RopeUnicode) or isinstance(other, RopeUnicode):
if isinstance(self, RopeUnicode):
- result = self._node.flatten_unicode()
+ result = self._node
else:
- result = self.decode('utf-8')._node.flatten_unicode()
+ result = self.decode('utf-8')._node
if isinstance(other, RopeUnicode):
- result += other._node.flatten_unicode()
+ result += other._node
else:
- result += other.decode('utf-8')._node.flatten_unicode()
+ result += other.decode('utf-8')._node
return RopeUnicode(result)
else:
- return RopeString(self._node.flatten_string() + other._node.flatten_string())
+ return RopeString(self._node + other._node)
def __getitem__(self, index):
if isinstance(index, int):
More information about the Pypy-commit
mailing list