[issue9196] Improve docs for string interpolation "%s" re Unicode strings

Craig McQueen report at bugs.python.org
Thu Jul 8 09:15:46 CEST 2010


Craig McQueen <python at craig.mcqueen.id.au> added the comment:

Another thing I discovered, for Example 1:
4. If test_object.__str__() returns a Unicode object (for some reason), and test_object.__unicode__() does not exist, then the Unicode value from the __str__() call is used as-is (no conversion to string, no encoding errors). This is also a little surprising [in this situation unicode(test_object) also returns the Unicode object returned by __str__() as-is, so I guess there's some consistency there].

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9196>
_______________________________________


More information about the Python-bugs-list mailing list