Skip to content

Commit 08e6543

Browse files
gh-111999: Fix the signature of str.format_map() (#119540)
1 parent de19694 commit 08e6543

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: Doc/library/stdtypes.rst

+1-1
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the signature of :meth:`str.format_map`.

Diff for: Objects/unicodeobject.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -13490,7 +13490,7 @@ Return a formatted version of the string, using substitutions from args and kwar
1349013490
The substitutions are identified by braces ('{' and '}').");
1349113491

1349213492
PyDoc_STRVAR(format_map__doc__,
13493-
"format_map($self, /, mapping)\n\
13493+
"format_map($self, mapping, /)\n\
1349413494
--\n\
1349513495
\n\
1349613496
Return a formatted version of the string, using substitutions from mapping.\n\

0 commit comments

Comments
 (0)