From b4b8917caf614953a1f0affc40ee494bd53a5980 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 17 Jan 2021 09:36:06 -0800 Subject: [PATCH] Update docs --- doc/syntax.rst | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/doc/syntax.rst b/doc/syntax.rst index e13faa97..d6840861 100644 --- a/doc/syntax.rst +++ b/doc/syntax.rst @@ -75,14 +75,14 @@ although some of the formatting options are only supported by the numeric types. 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`]["L"][`type`] fill: align: "<" | ">" | "^" sign: "+" | "-" | " " width: `integer` | "{" [`arg_id`] "}" precision: `integer` | "{" [`arg_id`] "}" type: "a" | "A" | "b" | "B" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | - : "L" | "o" | "p" | "s" | "x" | "X" + : "o" | "p" | "s" | "x" | "X" The *fill* character can be any Unicode code point other than ``'{'`` or ``'}'``. The presence of a fill character is signaled by the character following @@ -163,6 +163,9 @@ indicates the maximum field size - in other words, how many characters will be used from the field content. The *precision* is not allowed for integer, character, Boolean, and pointer values. +The ``'L'`` option uses the current locale setting to insert the appropriate +number separator characters. This option is only valid for numeric types. + Finally, the *type* determines how the data should be presented. The available string presentation types are: @@ -214,10 +217,6 @@ The available integer presentation types are: | | ``'#'`` option with this type adds the prefix ``"0X"`` | | | to the output value. | +---------+----------------------------------------------------------+ -| ``'L'`` | Locale-specific format. This is the same as ``'d'``, | -| | except that it uses the current locale setting to insert | -| | the appropriate number separator characters. | -+---------+----------------------------------------------------------+ | none | The same as ``'d'``. | +---------+----------------------------------------------------------+ @@ -261,10 +260,6 @@ The available presentation types for floating-point values are: | | ``'E'`` if the number gets too large. The | | | representations of infinity and NaN are uppercased, too. | +---------+----------------------------------------------------------+ -| ``'L'`` | Locale-specific format. This is the same as ``'g'``, | -| | except that it uses the current locale setting to insert | -| | the appropriate number separator characters. | -+---------+----------------------------------------------------------+ | none | Similar to ``'g'``, except that fixed-point notation, | | | when used, has at least one digit past the decimal | | | point. The default precision is as high as needed to |