Author: Philip Jenvey <[email protected]>
Branch: 
Changeset: r71142:1f2e9de489e6
Date: 2014-05-01 10:50 -0700
http://bitbucket.org/pypy/pypy/changeset/1f2e9de489e6/

Log:    use get_module_type_name for %T so we more closely match cpython, at
        least for builtin types

diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -362,9 +362,9 @@
                     value = getattr(self, attr)
                     if fmt == 'R':
                         result = space.str_w(space.repr(value))
-                    elif fmt in 'NT':
-                        if fmt == 'T':
-                            value = space.type(value)
+                    elif fmt == 'T':
+                        result = space.type(value).get_module_type_name()
+                    elif fmt == 'N':
                         result = value.getname(space)
                     else:
                         result = str(value)
@@ -404,7 +404,7 @@
 
     %N - The result of w_arg.getname(space)
     %R - The result of space.str_w(space.repr(w_arg))
-    %T - The result of space.type(w_arg).getname(space)
+    %T - The result of space.type(w_arg).get_module_type_name()
 
     """
     if not len(args):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to