[pypy-svn] r50050 - pypy/branch/ghop-ropes-classes/pypy/rlib
vinogradov at codespeak.net
vinogradov at codespeak.net
Sun Dec 23 20:05:50 CET 2007
Author: vinogradov
Date: Sun Dec 23 20:05:45 2007
New Revision: 50050
Modified:
pypy/branch/ghop-ropes-classes/pypy/rlib/ropewrapper.py
Log:
Implement methods of RopeUnicode to pass mul test
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 Dec 23 20:05:45 2007
@@ -45,4 +45,9 @@
def __add__(self, other):
return RopeUnicode(self._node + other._node)
-
+
+ def __mul__(self, n):
+ return RopeUnicode(rope.multiply(self._node, n))
+
+ def __rmul__(self, n):
+ return self * n
More information about the Pypy-commit
mailing list