[Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language? (original) (raw)
Terry Reedy tjreedy at udel.edu
Thu May 7 23:51:10 CEST 2009
- Previous message: [Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language?
- Next message: [Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Eric Smith wrote:
Eric Smith wrote:
Neal Becker wrote:
"formatspec ::= [[fill]align][sign][#][0][width][.precision][type]" "The precision is ignored for integer values."
In [36]: '%3x' % 10 Out[36]: ' a' In [37]: '%.3x' % 10 Out[37]: '00a' Apparently, precision is not ignored? That section is talking about this: >>> format(10, '.3x') Traceback (most recent call last): File "", line 1, in ValueError: Precision not allowed in integer format specifier So I guess it shouldn't say "is ignored", it should be "is not allowed".
My exact suggestion in http://bugs.python.org/issue5963
- Previous message: [Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language?
- Next message: [Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]