Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f49749c

Browse filesBrowse 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
Copy full SHA for f49749c

File tree

3 files changed

+3
-2
lines changed
Filter options

3 files changed

+3
-2
lines changed

‎Doc/library/stdtypes.rst

Copy file name to clipboardExpand all lines: Doc/library/stdtypes.rst
+1-1Lines 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
+1Lines 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

Copy file name to clipboardExpand all lines: Objects/unicodeobject.c
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.