Skip to content

Commit

Permalink
gh-116881: Remove erroneous or redundant grammar NULL (GH-116885)
Browse files Browse the repository at this point in the history
In Lexical Analysis f-strings section, NULL in the description
of 'literal character' means '\0'.  In the format_spec grammar
production, it is wrong with that meaning and redundant if
instead interpreted as <nothing>.  Remove it there.
  • Loading branch information
terryjreedy committed Mar 18, 2024
1 parent 3a99f5c commit 4e45c6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/reference/lexical_analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ for the contents of the string is:
: ("," `conditional_expression` | "," "*" `or_expr`)* [","]
: | `yield_expression`
conversion: "s" | "r" | "a"
format_spec: (`literal_char` | NULL | `replacement_field`)*
format_spec: (`literal_char` | `replacement_field`)*
literal_char: <any code point except "{", "}" or NULL>

The parts of the string outside curly braces are treated literally,
Expand Down

0 comments on commit 4e45c6c

Please sign in to comment.