[issue13790] In str.format an incorrect error message for list, tuple, dict, set

R. David Murray report at bugs.python.org
Mon Jan 16 00:00:50 CET 2012


R. David Murray <rdmurray at bitdance.com> added the comment:

Oh, and when you say there is nothing in the documentation about the 's' case for arbitrary objects, it is made clear in various places that every object has an str, which defaults to its repr if it has no specific __str__.  Combine that with the description of what happens when you use a fixed field length for 's', and you get the results you see.  There should be nothing surprising about this to anyone who has read the tutorial, I think.  (But specific suggestions for improving the docs are always welcome.)

----------

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


More information about the Python-bugs-list mailing list