[Python-checkins] r73983 - python/branches/py3k/Doc/library/string.rst
raymond.hettinger
python-checkins at python.org
Sun Jul 12 22:49:21 CEST 2009
Author: raymond.hettinger
Date: Sun Jul 12 22:49:21 2009
New Revision: 73983
Log:
Document the thousands separator.
Modified:
python/branches/py3k/Doc/library/string.rst
Modified: python/branches/py3k/Doc/library/string.rst
==============================================================================
--- python/branches/py3k/Doc/library/string.rst (original)
+++ python/branches/py3k/Doc/library/string.rst Sun Jul 12 22:49:21 2009
@@ -300,7 +300,7 @@
The general form of a *standard format specifier* is:
.. productionlist:: sf
- format_spec: [[`fill`]`align`][`sign`][#][0][`width`][.`precision`][`type`]
+ format_spec: [[`fill`]`align`][`sign`][#][0][`width`][,][.`precision`][`type`]
fill: <a character other than '}'>
align: "<" | ">" | "=" | "^"
sign: "+" | "-" | " "
@@ -358,6 +358,10 @@
hexadecimal output. If present, it specifies that the output will be prefixed
by ``'0b'``, ``'0o'``, or ``'0x'``, respectively.
+The ``','`` option signals the use of a comma for a thousands separator.
+For a locale aware separator, use the ``'n'`` integer presentation type
+instead.
+
*width* is a decimal integer defining the minimum field width. If not
specified, then the field width will be determined by the content.
More information about the Python-checkins
mailing list