Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b52f876

Browse files
committed
Issue 21533: Dicts take iterables, not iterators. Patch by Wolfgang Maier.
1 parent 8d21357 commit b52f876

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,8 +3031,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
30313031
If no positional argument is given, an empty dictionary is created.
30323032
If a positional argument is given and it is a mapping object, a dictionary
30333033
is created with the same key-value pairs as the mapping object. Otherwise,
3034-
the positional argument must be an :term:`iterator` object. Each item in
3035-
the iterable must itself be an iterator with exactly two objects. The
3034+
the positional argument must be an :term:`iterable` object. Each item in
3035+
the iterable must itself be an iterable with exactly two objects. The
30363036
first object of each item becomes a key in the new dictionary, and the
30373037
second object the corresponding value. If a key occurs more than once, the
30383038
last value for that key becomes the corresponding value in the new

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ Tim MacKenzie
818818
Nick Maclaren
819819
Don MacMillen
820820
Tomasz Maćkowiak
821+
Wolfgang Maier
821822
Steve Majewski
822823
Marek Majkowski
823824
Grzegorz Makarewicz

0 commit comments

Comments
 (0)