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

Method __contains__

Lib/dbm/dumb.py:251–260  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

249 return [(key, self[key]) for key in self._index.keys()]
250
251 def __contains__(self, key):
252 if isinstance(key, str):
253 key = key.encode('utf-8')
254 try:
255 return key in self._index
256 except TypeError:
257 if self._index is None:
258 raise error('DBM object has already been closed') from None
259 else:
260 raise
261
262 def iterkeys(self):
263 try:

Callers

nothing calls this directly

Calls 3

isinstanceFunction · 0.85
errorClass · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected