Skip to content

Commit 3115cb1

Browse files
Document that dict.get takes no keyword arguments
Running ```python {}.get("a", default="b") ``` gives: ``` {}.get("a", default="b") ~~~~~~^^^^^^^^^^^^^^^^^^ TypeError: dict.get() takes no keyword arguments ```
1 parent 30efede commit 3115cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4640,7 +4640,7 @@ can be used interchangeably to index the same dictionary entry.
46404640
such as an empty list. To get distinct values, use a :ref:`dict
46414641
comprehension <dict>` instead.
46424642

4643-
.. method:: get(key, default=None)
4643+
.. method:: get(key, default=None, /)
46444644

46454645
Return the value for *key* if *key* is in the dictionary, else *default*.
46464646
If *default* is not given, it defaults to ``None``, so that this method

0 commit comments

Comments
 (0)