Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix passing a generator to OrderedDict()
  • Loading branch information
coolreader18 committed Apr 2, 2020
commit 60d96c42a397cf335f19766085ccd0d7551a3d9b
6 changes: 5 additions & 1 deletion Lib/_collections_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,11 @@ def update(*args, **kwds):
len(args))
if args:
other = args[0]
if isinstance(other, Mapping):
try:
mapping_inst = isinstance(other, Mapping)
except TypeError:
mapping_inst = False
if mapping_inst:
for key in other:
self[key] = other[key]
elif hasattr(other, "keys"):
Expand Down