Message220401
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' |
|
Date |
User |
Action |
Args |
2014-06-13 00:32:12 | eric.smith | set | recipients:
+ eric.smith, terry.reedy, ezio.melotti, r.david.murray, docs@python, py.user, BreamoreBoy |
2014-06-13 00:32:12 | eric.smith | set | messageid: <1402619532.08.0.328338914691.issue13790@psf.upfronthosting.co.za> |
2014-06-13 00:32:12 | eric.smith | link | issue13790 messages |
2014-06-13 00:32:10 | eric.smith | create | |
|