Kaydet (Commit) 463bd4b5 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation.

üst 64a9972b
......@@ -12,6 +12,8 @@ Core and Builtins
Library
-------
- Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation.
- Issue #18978: ``urllib.request.Request`` now allows the method to be
indicated on the class and no longer sets it to None in ``__init__``.
......
......@@ -737,8 +737,13 @@ PyTclObject_str(PyTclObject *self, void *ignored)
static PyObject *
PyTclObject_repr(PyTclObject *self)
{
return PyUnicode_FromFormat("<%s object at %p>",
self->value->typePtr->name, self->value);
PyObject *repr, *str = PyTclObject_str(self, NULL);
if (str == NULL)
return NULL;
repr = PyUnicode_FromFormat("<%s object: %R>",
self->value->typePtr->name, str);
Py_DECREF(str);
return repr;
}
#define TEST_COND(cond) ((cond) ? Py_True : Py_False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment