[pypy-svn] r9965 - pypy/dist/pypy/objspace/std
tismer at codespeak.net
tismer at codespeak.net
Mon Mar 21 00:09:15 CET 2005
Author: tismer
Date: Mon Mar 21 00:09:15 2005
New Revision: 9965
Modified:
pypy/dist/pypy/objspace/std/unicodeobject.py
Log:
added error handling for the non unrealistic case that a string
cannot be converted to unicode during "contains"
Modified: pypy/dist/pypy/objspace/std/unicodeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/unicodeobject.py (original)
+++ pypy/dist/pypy/objspace/std/unicodeobject.py Mon Mar 21 00:09:15 2005
@@ -97,7 +97,10 @@
return space.wrap(space.unwrap(w_left) + space.unwrap(w_right))
def contains__String_Unicode(space, w_left, w_right):
- return space.wrap(space.unwrap(w_right) in space.unwrap(w_left))
+ try:
+ return space.wrap(space.unwrap(w_right) in space.unwrap(w_left))
+ except:
+ wrap_exception(space)
def contains__Unicode_Unicode(space, w_left, w_right):
return space.wrap(space.unwrap(w_right) in space.unwrap(w_left))
More information about the Pypy-commit
mailing list