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

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
@@ -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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy