Issue #25548: Showing memory address of class objects in repl

This commit is contained in:
Kushal Das 2016-06-04 16:21:13 -07:00
parent 409482251b
commit 5801ecb440
20 changed files with 106 additions and 92 deletions

View file

@ -859,9 +859,9 @@ type_repr(PyTypeObject *type)
}
if (mod != NULL && _PyUnicode_CompareWithId(mod, &PyId_builtins))
rtn = PyUnicode_FromFormat("<class '%U.%U'>", mod, name);
else
rtn = PyUnicode_FromFormat("<class '%s'>", type->tp_name);
rtn = PyUnicode_FromFormat("<class '%U.%U' at %p>", mod, name, type);
else
rtn = PyUnicode_FromFormat("<class '%s' at %p>", type->tp_name, type);
Py_XDECREF(mod);
Py_DECREF(name);