Commit fff86d2c authored by Neil Schemenauer's avatar Neil Schemenauer

Fix bug in last checkin (2.231). To match previous behavior, unicode

subclasses should be substituted as-is and not have tp_str called on
them.
parent d7062cee
......@@ -4078,6 +4078,11 @@ PyString_Format(PyObject *format, PyObject *args)
break;
case 's':
#ifdef Py_USING_UNICODE
if (PyUnicode_Check(v)) {
fmt = fmt_start;
argidx = argidx_start;
goto unicode;
}
temp = _PyObject_Str(v);
if (temp != NULL && PyUnicode_Check(temp)) {
Py_DECREF(temp);
......
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