diff --git a/Objects/object.c b/Objects/object.c index 866ce068c20..c4634f7d074 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -402,9 +402,9 @@ PyObject_Unicode(PyObject *v) PyObject *func; static PyObject *unicodestr; - if (v == NULL) + if (v == NULL) { res = PyString_FromString(""); - if (PyUnicode_CheckExact(v)) { + } else if (PyUnicode_CheckExact(v)) { Py_INCREF(v); return v; }