MCPcopy Index your code
hub / github.com/RustPython/RustPython / fromkeys

Method fromkeys

Lib/collections/__init__.py:1054–1056  ·  view source on GitHub ↗

Create a new ChainMap with keys from iterable and values set to value.

(cls, iterable, value=None, /)

Source from the content-addressed store, hash-verified

1052
1053 @classmethod
1054 def fromkeys(cls, iterable, value=None, /):
1055 'Create a new ChainMap with keys from iterable and values set to value.'
1056 return cls(dict.fromkeys(iterable, value))
1057
1058 def copy(self):
1059 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]'

Callers

nothing calls this directly

Calls 2

clsClass · 0.50
fromkeysMethod · 0.45

Tested by

no test coverage detected