Code
Hub
Trending
Digest
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/fluentpython/example-code-2e
/ __contains__
Method
__contains__
14-inheritance/strkeydict_dictsub.py:72–73 ·
view source on GitHub ↗
(self, key)
Source
from the content-addressed store, hash-verified
70
return
self[str(key)]
71
72
def
__contains__(self, key):
73
return
key in self.keys() or str(key) in self.keys()
74
75
def
__setitem__(self, key, item):
76
super().__setitem__(str(key), item)
Callers
nothing calls this directly
Calls
1
keys
Method · 0.45
Tested by
no test coverage detected