Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cf317a commit f5afb7fCopy full SHA for f5afb7f
1 file changed
Lib/collections/__init__.py
@@ -1011,8 +1011,8 @@ def __len__(self):
1011
1012
def __iter__(self):
1013
d = {}
1014
- for mapping in reversed(self.maps):
1015
- d.update(dict.fromkeys(mapping)) # reuses stored hash values if possible
+ for mapping in map(dict.fromkeys, reversed(self.maps)):
+ d |= mapping # reuses stored hash values if possible
1016
return iter(d)
1017
1018
def __contains__(self, key):
0 commit comments