[issue11264] Format Specification Mini-Language missing type 'i'?

Matt Joiner report at bugs.python.org
Mon Feb 21 05:21:12 CET 2011


New submission from Matt Joiner <anacrolix at gmail.com>:

The Format Specification Mini-Language is missing type 'i', generally the same as 'd', and ubiquitous in the libraries from which the specification is derived. See the 'd,i' conversion specifier in C: http://linux.die.net/man/3/printf, and the Old String Formatting Operations: http://docs.python.org/dev/py3k/library/stdtypes.html#old-string-formatting-operations.

>>> '{:d}'.format(3)
'3'
>>> '{:i}'.format(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'i' for object of type 'int'

----------
components: Interpreter Core
messages: 128934
nosy: anacrolix
priority: normal
severity: normal
status: open
title: Format Specification Mini-Language missing type 'i'?
versions: Python 2.6, Python 2.7, Python 3.2, Python 3.3

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


More information about the Python-bugs-list mailing list