8000
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 fc5f68e commit 03f7aafCopy full SHA for 03f7aaf
Lib/collections/__init__.py
@@ -1038,9 +1038,9 @@ def __repr__(self):
1038
return f'{self.__class__.__name__}({", ".join(map(repr, self.maps))})'
1039
1040
@classmethod
1041
- def fromkeys(cls, iterable, *args):
1042
- 'Create a ChainMap with a single dict created from the iterable.'
1043
- return cls(dict.fromkeys(iterable, *args))
+ def fromkeys(cls, iterable, value=None, /):
+ 'Create a new ChainMap with keys from iterable and values set to value.'
+ return cls(dict.fromkeys(iterable, value))
1044
1045
def copy(self):
1046
'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'
0 commit comments