The python documentation contains information about the grammar of the strings, however I cannot find information on how to read the table defining the grammar for the replacement field.
replacement_field ::= "{" [field_name] ["!" conversion] [":" format_spec] "}"
field_name ::= arg_name ("." attribute_name | "[" element_index "]")*
arg_name ::= [identifier | integer]
attribute_name ::= identifier
element_index ::= integer | index_string
index_string ::= <any source character except "]"> +
conversion ::= "r" | "s" | "a"
format_spec ::= <described in the next section>
The format section has a similar table.
I understand the parts of the table, how ::=separates the definiteness and the determinant, the characters inside the quotes are literals, which |means "or", but the rest of the table eludes me.
source
share