summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorKushal Das <kushaldas@gmail.com>2016-06-04 23:21:13 (GMT)
committerKushal Das <kushaldas@gmail.com>2016-06-04 23:21:13 (GMT)
commit5801ecb4408cd11f6e6ffcb1612ca68d9936a728 (patch)
treed50a9aa79b55eb92dde2c12908d6ecb14fc7f1d5 /Objects
parent409482251b06fe75c4ee56e85ffbb4b23d934159 (diff)
downloadcpython-5801ecb4408cd11f6e6ffcb1612ca68d9936a728.zip
cpython-5801ecb4408cd11f6e6ffcb1612ca68d9936a728.tar.gz
cpython-5801ecb4408cd11f6e6ffcb1612ca68d9936a728.tar.bz2
Issue #25548: Showing memory address of class objects in repl
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index a647791..78d5c1e 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -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);