STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Case "S" (type str): "%s" uses _PyObject_Str() which checks the object 
type with PyString_CheckExact().

Case "U" (type unicode) "%s" uses PyUnicode_Check() and then calls 
PyUnicode_Format(). PyUnicode_Format() uses PyUnicode_Check() to check 
the object object. It should uses PyUnicode_CheckExact() instead.

xxx_CheckExact() is different than xxx_Check(): exact is only true for 
the base type, whereas the the second is also true for subclass.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1583863>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to