Skip to content

Commit f49749c

Browse files
[3.13] gh-111999: Fix the signature of str.format_map() (GH-119540) (#119543)
(cherry picked from commit 08e6543) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 5544651 commit f49749c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ expression support in the :mod:`re` module).
17681768
cases.
17691769

17701770

1771-
.. method:: str.format_map(mapping)
1771+
.. method:: str.format_map(mapping, /)
17721772

17731773
Similar to ``str.format(**mapping)``, except that ``mapping`` is
17741774
used directly and not copied to a :class:`dict`. This is useful
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the signature of :meth:`str.format_map`.

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13411,7 +13411,7 @@ Return a formatted version of the string, using substitutions from args and kwar
1341113411
The substitutions are identified by braces ('{' and '}').");
1341213412

1341313413
PyDoc_STRVAR(format_map__doc__,
13414-
"format_map($self, /, mapping)\n\
13414+
"format_map($self, mapping, /)\n\
1341513415
--\n\
1341613416
\n\
1341713417
Return a formatted version of the string, using substitutions from mapping.\n\

0 commit comments

Comments
 (0)