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 eric.smith
Recipients BreamoreBoy, docs@python, eric.smith, ezio.melotti, py.user, r.david.murray, terry.reedy
Date 2014-06-13.00:32:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402619532.08.0.328338914691.issue13790@psf.upfronthosting.co.za>
In-reply-to
Content
I believe that comment was referring to the subject of this bug:

$ ./python
Python 3.4.1+ (3.4:bec6f18dd636, Jun 12 2014, 20:23:30)
[GCC 4.8.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> format([], 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__
>>> format((), 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__
>>> format({}, 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__
>>> format(set(), 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: non-empty format string passed to object.__format__

With the possible exception of listing the type in this error message, I think these are all fine.


I'm not sure what you'd expect format('a', 'd') to produce other than the error you're seeing. 'd' is in fact an unknown "format code" for str.

>>> format('a', 'd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'd' for object of type 'str'
History
Date User Action Args
2014-06-13 00:32:12eric.smithsetrecipients: + eric.smith, terry.reedy, ezio.melotti, r.david.murray, docs@python, py.user, BreamoreBoy
2014-06-13 00:32:12eric.smithsetmessageid: <1402619532.08.0.328338914691.issue13790@psf.upfronthosting.co.za>
2014-06-13 00:32:12eric.smithlinkissue13790 messages
2014-06-13 00:32:10eric.smithcreate