diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-03-18 14:37:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 14:37:26 (GMT) |
commit | 6383b14957e9f8919562e9546d8288fcedeac822 (patch) | |
tree | 17de3683f8a4b55c165cb814f9fd43f702f4f598 | |
parent | 1c0c6c91afcb765f30bbb4e3d80a50e31d7adfcc (diff) | |
download | cpython-6383b14957e9f8919562e9546d8288fcedeac822.zip cpython-6383b14957e9f8919562e9546d8288fcedeac822.tar.gz cpython-6383b14957e9f8919562e9546d8288fcedeac822.tar.bz2 |
[3.12] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) (#116951)
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>
-rw-r--r-- | Doc/reference/lexical_analysis.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index 94b13a0..256f6ba 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -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, |