Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with docstrings (GH-119330) #119370

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4565,7 +4565,7 @@ can be used interchangeably to index the same dictionary entry.

Return a shallow copy of the dictionary.

.. classmethod:: fromkeys(iterable[, value])
.. classmethod:: fromkeys(iterable, value=None)

Create a new dictionary with keys from *iterable* and values set to *value*.

Expand All @@ -4575,7 +4575,7 @@ can be used interchangeably to index the same dictionary entry.
such as an empty list. To get distinct values, use a :ref:`dict
comprehension <dict>` instead.

.. method:: get(key[, default])
.. method:: get(key, default=None)

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

.. versionadded:: 3.8

.. method:: setdefault(key[, default])
.. method:: setdefault(key, default=None)

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