Issue #1583863: An unicode subclass can now override the __str__ method

This commit is contained in:
Victor Stinner 2010-03-22 12:24:37 +00:00
parent eef159bd17
commit 95affc4449
3 changed files with 14 additions and 1 deletions

View file

@ -8466,7 +8466,7 @@ PyObject *PyUnicode_Format(PyObject *format,
case 's':
case 'r':
if (PyUnicode_Check(v) && c == 's') {
if (PyUnicode_CheckExact(v) && c == 's') {
temp = v;
Py_INCREF(temp);
}