summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index e4687a3..b7711d5 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -261,11 +261,9 @@ method_repr(PyMethodObject *a)
result = PyUnicode_FromFormat("<unbound method %s.%s>",
sklassname, sfuncname);
else {
- result = PyUnicode_FromFormat("<bound method %s.%s of ",
- sklassname, sfuncname);
- /* XXX Shouldn't use repr() here! */
- PyUnicode_AppendAndDel(&result, PyObject_Repr(self));
- PyUnicode_AppendAndDel(&result, PyUnicode_FromString(">"));
+ /* XXX Shouldn't use repr()/%R here! */
+ result = PyUnicode_FromFormat("<bound method %s.%s of %R>",
+ sklassname, sfuncname, self);
}
Py_XDECREF(funcname);
Py_XDECREF(klassname);