diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-08-31 23:02:05 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2005-08-31 23:02:05 (GMT) |
commit | ab6192363775022dffc7384bf04c03a8130d47ed (patch) | |
tree | bdf937a656ab3abef57e9403e81f97cfa6758e2e /Objects | |
parent | a1be88e24d4a9e72f89c755026bb00a5cad59e97 (diff) | |
download | cpython-ab6192363775022dffc7384bf04c03a8130d47ed.zip cpython-ab6192363775022dffc7384bf04c03a8130d47ed.tar.gz cpython-ab6192363775022dffc7384bf04c03a8130d47ed.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 9bcae0f..05deb3a 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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); |