mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
Issue #1583863: An unicode subclass can now override the __str__ method
This commit is contained in:
parent
eef159bd17
commit
95affc4449
3 changed files with 14 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue