[Python-checkins] Document that dict.fromkeys accepts any iterable for keys (GH-10998) (GH-11294)
Raymond Hettinger
webhook-mailer at python.org
Sat Dec 22 23:56:05 EST 2018
https://github.com/python/cpython/commit/a58c8442f15914a43a83862f2644569263b1ed7d
commit: a58c8442f15914a43a83862f2644569263b1ed7d
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2018-12-22T20:56:01-08:00
summary:
Document that dict.fromkeys accepts any iterable for keys (GH-10998) (GH-11294)
(cherry picked from commit f06fba5965b4265c42291d10454f387b76111f26)
Co-authored-by: Andre Delfino <adelfino at gmail.com>
files:
M Doc/library/stdtypes.rst
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index dd5a8ed35bf9..057c5d5f35c0 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -4201,9 +4201,9 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
Return a shallow copy of the dictionary.
- .. classmethod:: fromkeys(seq[, value])
+ .. classmethod:: fromkeys(iterable[, value])
- Create a new dictionary with keys from *seq* and values set to *value*.
+ Create a new dictionary with keys from *iterable* and values set to *value*.
:meth:`fromkeys` is a class method that returns a new dictionary. *value*
defaults to ``None``.
More information about the Python-checkins
mailing list