https://github.com/python/cpython/commit/525eddf220318f1d60644fec57890f0607de4168 commit: 525eddf220318f1d60644fec57890f0607de4168 branch: 3.12 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: picnixz <10796600+picn...@users.noreply.github.com> date: 2025-03-30T09:29:49Z summary:
[3.12] gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208) (#131894) gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208) (cherry picked from commit edfbd8c062285e83dc5f596288df2a762e68bcdc) Co-authored-by: Adam Dangoor <adamdang...@gmail.com> files: M Doc/library/stdtypes.rst diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index c0b6b9ed6c0023..31b0f6f12544bc 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4577,7 +4577,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=None) + .. 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 @@ -4619,7 +4619,7 @@ can be used interchangeably to index the same dictionary entry. .. versionadded:: 3.8 - .. method:: setdefault(key, default=None) + .. 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 _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com