[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor
STINNER Victor added the comment: Commited: r79278+r79280 (trunk), r79281 (py3k), r79282 (3.1), r79283 (2.6). -- ___ Python tracker ___ ___

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2009-03-30 Thread STINNER Victor
STINNER Victor added the comment: Patch: Use PyUnicode_CheckExact() instead of PyUnicode_CheckExact() in PyUnicode_Format() to use obj.__unicode__ slot. -- keywords: +patch Added file: http://bugs.python.org/file13467/format_unicode.patch ___ Python

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2009-03-30 Thread STINNER Victor
STINNER Victor 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 objec

[issue1583863] __str__ cannot be overridden on unicode-derived classes

2009-03-29 Thread Daniel Diniz
Daniel Diniz added the comment: Confirmed in trunk. -- components: +Unicode nosy: +ajaksu2, haypo stage: -> test needed type: -> behavior versions: +Python 2.6 -Python 2.5 ___ Python tracker __