[pypy-svn] r12324 - pypy/dist/pypy/objspace/std
ale at codespeak.net
ale at codespeak.net
Sun May 15 20:52:35 CEST 2005
Author: ale
Date: Sun May 15 20:52:35 2005
New Revision: 12324
Modified:
pypy/dist/pypy/objspace/std/stringobject.py
Log:
Added a MultiMethod for catching the situation tested in test_str.py : " 'abc'.__mul__('') " which should raise a TypeError (but raised a NotImplementedError instead).
The remaining failing test in test_str.py is due to a missing __getslice__ method. Do we want to have strings to have __getslice__ ? (It is deprecated since 2.0 so I would vote no)
Modified: pypy/dist/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringobject.py (original)
+++ pypy/dist/pypy/objspace/std/stringobject.py Sun May 15 20:52:35 2005
@@ -916,6 +916,9 @@
def mul__String_ANY(space, w_str, w_times):
return mul_string_times(space, w_str, w_times)
+def mul__String_String(space, w_str, w_times):
+ raise OperationError( space.w_TypeError, space.wrap("an integer is required"))
+
def mul__ANY_String(space, w_times, w_str):
return mul_string_times(space, w_str, w_times)
More information about the Pypy-commit
mailing list