Message151725
| 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.2877095e-06 |
| Marked as misclassified |
No |
| Message-id |
<1327125385.02.0.628755184945.issue13790@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|