MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / __contains__

Method __contains__

03-dict-set/strkeydict0.py:52–53  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

50 return default # <5>
51
52 def __contains__(self, key):
53 return key in self.keys() or str(key) in self.keys() # <6>
54
55# end::STRKEYDICT0[]

Callers

nothing calls this directly

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected