diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-22 01:31:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 01:31:56 (GMT) |
commit | 455b3862347fbada343af0c6e158511b669998c6 (patch) | |
tree | 99970fc9b9435363b0754c7f4fe20aea36ad5f97 | |
parent | e9922178100e17f0264dd943ac838b2f7e8cfdab (diff) | |
download | cpython-455b3862347fbada343af0c6e158511b669998c6.zip cpython-455b3862347fbada343af0c6e158511b669998c6.tar.gz cpython-455b3862347fbada343af0c6e158511b669998c6.tar.bz2 |
[3.13] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with docstrings (GH-119330) (#119370)
(cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832)
Co-authored-by: Landon Wood <landon@elkrange.com>
-rw-r--r-- | Doc/library/stdtypes.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 8f5f9ee..c5a965b 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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*. @@ -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 @@ -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 |