Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r 31fc3ff3e626 pypy/objspace/std/test/test_unicodeobject.py
- --- a/pypy/objspace/std/test/test_unicodeobject.py Mon Sep 26 17:50:09 2011 -0400
- +++ b/pypy/objspace/std/test/test_unicodeobject.py Wed Sep 28 02:14:18 2011 -0400
- @@ -443,6 +443,7 @@
- assert u'<i><i><i>c' == u'abababc'.translate({ord('a'):None, ord('b'):u'<i>'})
- assert u'c' == u'abababc'.translate({ord('a'):None, ord('b'):u''})
- assert u'xyyx' == u'xzx'.translate({ord('z'):u'yy'})
- + assert u'abcd' == u'abcd'.translate(u'')
- raises(TypeError, u'hello'.translate)
- raises(TypeError, u'abababc'.translate, {ord('a'):''})
- diff -r 31fc3ff3e626 pypy/objspace/std/unicodeobject.py
- --- a/pypy/objspace/std/unicodeobject.py Mon Sep 26 17:50:09 2011 -0400
- +++ b/pypy/objspace/std/unicodeobject.py Wed Sep 28 02:14:18 2011 -0400
- @@ -893,7 +893,7 @@
- try:
- w_newval = space.getitem(w_table, space.wrap(ord(unichar)))
- except OperationError, e:
- - if e.match(space, space.w_KeyError):
- + if e.match(space, space.w_KeyError) or e.match(space, space.w_IndexError):
- result.append(unichar)
- else:
- raise
Add Comment
Please, Sign In to add comment