mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-32720: Fixed the replacement field grammar documentation. (GH-5544)
`arg_name` and `element_index` are defined as `digit`+ instead of `integer`.
This commit is contained in:
parent
d1f318105b
commit
7a561afd2c
1 changed files with 2 additions and 2 deletions
|
@ -202,9 +202,9 @@ The grammar for a replacement field is as follows:
|
|||
.. productionlist:: sf
|
||||
replacement_field: "{" [`field_name`] ["!" `conversion`] [":" `format_spec`] "}"
|
||||
field_name: arg_name ("." `attribute_name` | "[" `element_index` "]")*
|
||||
arg_name: [`identifier` | `integer`]
|
||||
arg_name: [`identifier` | `digit`+]
|
||||
attribute_name: `identifier`
|
||||
element_index: `integer` | `index_string`
|
||||
element_index: `digit`+ | `index_string`
|
||||
index_string: <any source character except "]"> +
|
||||
conversion: "r" | "s" | "a"
|
||||
format_spec: <described in the next section>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue