Skip to content

Commit 2570896

Browse files
[3.13] gh-131885: Document that dict.setdefault and dict.get take no keyword arguments (GH-128208) (#131893)
gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208) (cherry picked from commit edfbd8c) Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
1 parent 07d4c7e commit 2570896

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/stdtypes.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -4586,7 +4586,7 @@ can be used interchangeably to index the same dictionary entry.
45864586
such as an empty list. To get distinct values, use a :ref:`dict
45874587
comprehension <dict>` instead.
45884588

4589-
.. method:: get(key, default=None)
4589+
.. method:: get(key, default=None, /)
45904590

45914591
Return the value for *key* if *key* is in the dictionary, else *default*.
45924592
If *default* is not given, it defaults to ``None``, so that this method
@@ -4628,7 +4628,7 @@ can be used interchangeably to index the same dictionary entry.
46284628

46294629
.. versionadded:: 3.8
46304630

4631-
.. method:: setdefault(key, default=None)
4631+
.. method:: setdefault(key, default=None, /)
46324632

46334633
If *key* is in the dictionary, return its value. If not, insert *key*
46344634
with a value of *default* and return *default*. *default* defaults to

0 commit comments

Comments
 (0)