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

R. David Murray report at bugs.python.org
Sun Jan 15 23:54:16 CET 2012


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

No, it wouldn't.  I expect

  "{}".format(x)

to produce something for an arbitrary x.  Breaking that would break a fundamental Python contract.

Improving the error message for 'd' is more possible.  Perhaps "the format code 'd' is not implemented by objects of type <type>"?

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list