[pypy-commit] pypy remove-dict-smm: Improve error message.

Manuel Jacob noreply at buildbot.pypy.org
Tue May 14 23:06:07 CEST 2013


Author: Manuel Jacob
Branch: remove-dict-smm
Changeset: r64105:92250ea92f14
Date: 2013-05-14 23:03 +0200
http://bitbucket.org/pypy/pypy/changeset/92250ea92f14/

Log:	Improve error message.

diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -114,7 +114,7 @@
         if not isinstance(w_other, W_DictMultiObject):
             raise operationerrfmt(space.w_TypeError,
                                   "Expected dict object, got %s",
-                                  space.str_w(space.str(space.type(w_other))))
+                                  space.type(w_other).getname(space))
 
         if self.length() != w_other.length():
             return space.w_False
@@ -138,7 +138,7 @@
         if not isinstance(w_other, W_DictMultiObject):
             raise operationerrfmt(space.w_TypeError,
                                   "Expected dict object, got %s",
-                                  space.str_w(space.str(space.type(w_other))))
+                                  space.type(w_other).getname(space))
 
         # Different sizes, no problem
         if self.length() < w_other.length():


More information about the pypy-commit mailing list