diff options
author | Kushal Das <kushaldas@gmail.com> | 2016-06-04 23:21:13 (GMT) |
---|---|---|
committer | Kushal Das <kushaldas@gmail.com> | 2016-06-04 23:21:13 (GMT) |
commit | 5801ecb4408cd11f6e6ffcb1612ca68d9936a728 (patch) | |
tree | d50a9aa79b55eb92dde2c12908d6ecb14fc7f1d5 /Objects | |
parent | 409482251b06fe75c4ee56e85ffbb4b23d934159 (diff) | |
download | cpython-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.c | 6 |
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); |