]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) (#116952)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 18 Mar 2024 14:37:42 +0000 (15:37 +0100)
committerGitHub <noreply@github.com>
Mon, 18 Mar 2024 14:37:42 +0000 (10:37 -0400)
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.
(cherry picked from commit 4e45c6c54a9457b1ca5b4cf3aa2843b7218d4414)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc/reference/lexical_analysis.rst

index 6cfe2b3d4f74ca5d9bbf83ae60a1996878085da6..65d9de5534a6272acc895631b646affc906460da 100644 (file)
@@ -720,7 +720,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,