From 50adb581159c304142a3748d706a4780d7a7c17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 6 Dec 2018 14:49:37 -0300 Subject: [PATCH 1/3] Document that seq refers to any iterable --- Doc/library/stdtypes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6ddf41a74a4c61..2286b490cec42c 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4245,7 +4245,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: .. classmethod:: fromkeys(seq[, value]) - Create a new dictionary with keys from *seq* and values set to *value*. + Create a new dictionary with keys from iterable *seq* and values set to + *value*. :meth:`fromkeys` is a class method that returns a new dictionary. *value* defaults to ``None``. From 0da68123315075c3bf9f8d7a0f0786dba4342960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 6 Dec 2018 14:55:54 -0300 Subject: [PATCH 2/3] Change parameter name to iterable --- Doc/library/stdtypes.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 2286b490cec42c..b2cc1d92cda0f8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4243,10 +4243,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 iterable *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``. From 42e943bcf110c811a8d94a89741772680be53833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Thu, 6 Dec 2018 14:58:38 -0300 Subject: [PATCH 3/3] Style --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index b2cc1d92cda0f8..22b79fefab46e8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4245,7 +4245,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: .. classmethod:: fromkeys(iterable[, value]) - Create a new dictionary with keys from iterable 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``.