This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, eric.smith, py.user, r.david.murray, terry.reedy
Date 2012-01-21.05:56:23
SpamBayes Score 2.28771e-06
Marked as misclassified No
Message-id <>
OK, the example of an empty format spec should be dropped. Let people figure it out ;-).

>>> format([], 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'd' for object of type 'str'

One possibility is to give (str of) the object instead of the type:

ValueError: Unknown format code 'd' for object '[]'

The downside is a long message for long strings. It would need to be limited (as is done in test error reports).
Date User Action Args
2012-01-21 05:56:25terry.reedysetrecipients: + terry.reedy, eric.smith, r.david.murray, docs@python, py.user
2012-01-21 05:56:25terry.reedysetmessageid: <>
2012-01-21 05:56:24terry.reedylinkissue13790 messages
2012-01-21 05:56:24terry.reedycreate