Skip to content

Commit 07be487

Browse files
Change BNF definition
1 parent 8745604 commit 07be487

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/string.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,14 +319,16 @@ non-empty format specification typically modifies the result.
319319
The general form of a *standard format specifier* is:
320320

321321
.. productionlist:: format-spec
322-
format_spec: [[`fill`]`align`][`sign`]["z"]["#"]["0"][`width`][`grouping`]["." `precision`][`type`]
322+
format_spec: [`options`][`width`][`grouping`]["." `precision`][`type`]
323+
options: [[`fill`]`align`][`sign`]["z"]["#"]["0"]
323324
fill: <any character>
324325
align: "<" | ">" | "=" | "^"
325326
sign: "+" | "-" | " "
326327
width: `~python-grammar:digit`+
327328
grouping: "," | "_"
328329
precision: `~python-grammar:digit`+
329-
type: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
330+
type: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g"
331+
: | "G" | "n" | "o" | "s" | "x" | "X" | "%"
330332

331333
If a valid *align* value is specified, it can be preceded by a *fill*
332334
character that can be any character and defaults to a space if omitted.

0 commit comments

Comments
 (0)