Skip to content

Commit

Permalink
pythongh-116881: Remove erroneous or redundant grammar NULL (pythonGH…
Browse files Browse the repository at this point in the history
…-116885)

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 authored and vstinner committed Mar 20, 2024
1 parent cff7c5d commit 43b857d
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 43b857d

Please sign in to comment.