[New-bugs-announce] [issue5963] Doc error: integer precision in formats

Terry J. Reedy report at bugs.python.org
Thu May 7 21:31:51 CEST 2009

New submission from Terry J. Reedy <tjreedy at udel.edu>:

String Services / Format Specification Mini-Language ( in 3.1)

"The precision is ignored for integer values."
in 3.0.1 and 3.1.b1 and, I presume in 2.6/7 doc

should be "A precision is not allowed for integer values."

>> format(10, '3x')
'  a'
>>> format(10, '.3x')
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    format(10, '.3x')
ValueError: Precision not allowed in integer format specifier

(I assume but cannot check that 2.6/7 behave the same.)

assignee: georg.brandl
components: Documentation
messages: 87394
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Doc error: integer precision in formats
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list