]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-111999: Fix the signature of str.format_map() (GH-119540) (#119543)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 25 May 2024 13:46:41 +0000 (15:46 +0200)
committerGitHub <noreply@github.com>
Sat, 25 May 2024 13:46:41 +0000 (13:46 +0000)
(cherry picked from commit 08e65430aafa1047029e6f132a5f748c415bda14)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/stdtypes.rst
Misc/NEWS.d/next/Core and Builtins/2024-05-25-13-51-48.gh-issue-111999.L0q1gh.rst [new file with mode: 0644]
Objects/unicodeobject.c

index c5a965b23016d029f42a33507ad7a8720378b99b..ca4c949aafced015226a823e656bb2ea1160db79 100644 (file)
@@ -1768,7 +1768,7 @@ expression support in the :mod:`re` module).
       cases.
 
 
-.. method:: str.format_map(mapping)
+.. method:: str.format_map(mapping, /)
 
    Similar to ``str.format(**mapping)``, except that ``mapping`` is
    used directly and not copied to a :class:`dict`.  This is useful
diff --git a/Misc/NEWS.d/next/Core and Builtins/2024-05-25-13-51-48.gh-issue-111999.L0q1gh.rst b/Misc/NEWS.d/next/Core and Builtins/2024-05-25-13-51-48.gh-issue-111999.L0q1gh.rst
new file mode 100644 (file)
index 0000000..4b1ca6c
--- /dev/null
@@ -0,0 +1 @@
+Fix the signature of :meth:`str.format_map`.
index 480b6713905c70738351274bf6ab6ced2e6488a4..c8a07288d397d234930c31d02f39543993650f03 100644 (file)
@@ -13411,7 +13411,7 @@ Return a formatted version of the string, using substitutions from args and kwar
 The substitutions are identified by braces ('{' and '}').");
 
 PyDoc_STRVAR(format_map__doc__,
-             "format_map($self, /, mapping)\n\
+             "format_map($self, mapping, /)\n\
 --\n\
 \n\
 Return a formatted version of the string, using substitutions from mapping.\n\