summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 3576ced..f0acead 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -99,7 +99,8 @@ sys_displayhook_unencodable(PyObject *outf, PyObject *o)
buffer = PyObject_GetAttrString(outf, "buffer");
if (buffer) {
- result = PyObject_CallMethod(buffer, "write", "(O)", encoded);
+ _Py_identifier(write);
+ result = _PyObject_CallMethodId(buffer, &PyId_write, "(O)", encoded);
Py_DECREF(buffer);
Py_DECREF(encoded);
if (result == NULL)