]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-116881: Remove erroneous or redundant grammar NULL (GH-116885)
authorTerry Jan Reedy <tjreedy@udel.edu>
Mon, 18 Mar 2024 09:31:13 +0000 (05:31 -0400)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2024 09:31:13 +0000 (10:31 +0100)
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.

Doc/reference/lexical_analysis.rst

index 40bd477bcaf762bfe39b4c6f12533150b7052ddd..f0b3d0a7458cbeb6e3e30d7619bf80dcd53255dd 100644 (file)
@@ -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,