8000 Document that dict.fromkeys accepts any iterable for keys (GH-10998) … · python/cpython@a58c844 · GitHub
[go: up one dir, main page]

Skip to content

Commit a58c844

Browse files
miss-islingtonandresdelfino
authored andcommitted
Document that dict.fromkeys accepts any iterable for keys (GH-10998) (GH-11294)
(cherry picked from commit f06fba5) Co-authored-by: Andre Delfino <adelfino@gmail.com>
1 parent 48a2069 commit a58c844

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
4204
Original file line numberDiff line numberDiff line change
@@ -4201,9 +4201,9 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
42014201

42024202
Return a shallow copy of the dictionary.
42034203

-
.. classmethod:: fromkeys(seq[, value])
4204+
.. classmethod:: fromkeys(iterable[, value])
42054205

4206-
Create a new dictionary with keys from *seq* and values set to *value*.
4206+
Create a new dictionary with keys from *iterable* and values set to *value*.
42074207

42084208
:meth:`fromkeys` is a class method that returns a new dictionary. *value*
42094209
defaults to ``None``.

0 commit comments

Comments
 (0)
0