summaryrefslogtreecommitdiff
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 9bcae0ff2c..05deb3a98c 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);