Eric Smith wrote:
Neal Becker wrote:
"format_spec ::= [[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 "<stdin>", line 1, in <module>
ValueError: Precision not allowed in integer format specifier
So I guess it shouldn't say "is ignored", it should be "is not allowed".
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com