MCPcopy Index your code
hub / github.com/python/cpython / get

Method get

Lib/collections/__init__.py:1069–1070  ·  view source on GitHub ↗
(self, key, default=None)

Source from the content-addressed store, hash-verified

1067 return self.__missing__(key) # support subclasses that define __missing__
1068
1069 def get(self, key, default=None):
1070 return self[key] if key in self else default # needs to make use of __contains__
1071
1072 def __len__(self):
1073 return len(set().union(*self.maps)) # reuses stored hash values if possible

Callers 3

namedtupleFunction · 0.45
initscrFunction · 0.45
has_keyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected