@@ -208,13 +208,13 @@ The grammar for a replacement field is as follows:
208208
209209.. productionlist :: format-string
210210 replacement_field: "{" [`field_name `] ["!" `conversion `] [":" `format_spec `] "}"
211- field_name: arg_name ("." `attribute_name ` | "[" `element_index ` "]")*
212- arg_name: [`identifier ` | `digit`+]
213- attribute_name: `identifier `
214- element_index: `digit`+ | `index_string `
211+ field_name: ` arg_name ` ("." `attribute_name ` | "[" `element_index ` "]")*
212+ arg_name: [`~python-grammar: identifier ` | `~python-grammar: digit`+]
213+ attribute_name: `~python-grammar: identifier `
214+ element_index: `~python-grammar: digit`+ | `index_string `
215215 index_string: <any source character except "]"> +
216216 conversion: "r" | "s" | "a"
217- format_spec: <described in the next section>
217+ format_spec: ` format-spec:format_spec `
218218
219219In less formal terms, the replacement field can start with a *field_name * that specifies
220220the object whose value is to be formatted and inserted
@@ -316,9 +316,9 @@ The general form of a *standard format specifier* is:
316316 fill: <any character>
317317 align: "<" | ">" | "=" | "^"
318318 sign: "+" | "-" | " "
319- width: `digit`+
319+ width: `~python-grammar: digit`+
320320 grouping_option: "_" | ","
321- precision: `digit`+
321+ precision: `~python-grammar: digit`+
322322 type: "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
323323
324324If a valid *align * value is specified, it can be preceded by a *fill *
0 commit comments