Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions Lib/_collections_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ def update(self, other=(), /, **kwds):
In either case, this is followed by: for k, v in F.items(): D[k] = v
'''
if isinstance(other, Mapping):
for key in other:
self[key] = other[key]
for key, value in other.items():
self[key] = value
elif hasattr(other, "keys"):
for key in other.keys():
self[key] = other[key]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved performance of :meth:`collections.abc.MutableMapping.update`.
Loading