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

Method __contains__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

errorClass · 0.70
encodeMethod · 0.45

Tested by

no test coverage detected