https://github.com/python/cpython/commit/c2bb3f9843bc4763d6d41e883dbe9525f5155a4a
commit: c2bb3f9843bc4763d6d41e883dbe9525f5155a4a
branch: main
author: GiGaGon <107241144+megagiga...@users.noreply.github.com>
committer: terryjreedy <tjre...@udel.edu>
date: 2025-06-14T00:40:42-04:00
summary:

gh-135496: Fix f string exclamation mark error typo (#135495)

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
M Lib/test/test_fstring.py
M Parser/action_helpers.c

diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index dd58e032a8befe..f54557056784f2 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -1380,7 +1380,7 @@ def test_conversions(self):
         for conv in ' s', ' s ':
             self.assertAllRaise(SyntaxError,
                                 "f-string: conversion type must come right 
after the"
-                                " exclamanation mark",
+                                " exclamation mark",
                                 ["f'{3!" + conv + "}'"])
 
         self.assertAllRaise(SyntaxError,
diff --git 
a/Misc/NEWS.d/next/Core_and_Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
 
b/Misc/NEWS.d/next/Core_and_Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
new file mode 100644
index 00000000000000..03b1f4590c5846
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Core_and_Builtins/2025-06-14-01-01-14.gh-issue-135496.ER0Me3.rst
@@ -0,0 +1 @@
+Fix typo in the f-string conversion type error ("exclamanation" -> 
"exclamation").
diff --git a/Parser/action_helpers.c b/Parser/action_helpers.c
index 3bcc0870882a29..0d362bf7a9111a 100644
--- a/Parser/action_helpers.c
+++ b/Parser/action_helpers.c
@@ -965,7 +965,7 @@ _PyPegen_check_fstring_conversion(Parser *p, Token* 
conv_token, expr_ty conv)
     if (conv_token->lineno != conv->lineno || conv_token->end_col_offset != 
conv->col_offset) {
         return RAISE_SYNTAX_ERROR_KNOWN_RANGE(
             conv_token, conv,
-            "%c-string: conversion type must come right after the 
exclamanation mark",
+            "%c-string: conversion type must come right after the exclamation 
mark",
             TOK_GET_STRING_PREFIX(p->tok)
         );
     }

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to