MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __getitem__

Method __getitem__

tools/python-3.11.9-amd64/Lib/shelve.py:109–117  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

107 return default
108
109 def __getitem__(self, key):
110 try:
111 value = self.cache[key]
112 except KeyError:
113 f = BytesIO(self.dict[key.encode(self.keyencoding)])
114 value = Unpickler(f).load()
115 if self.writeback:
116 self.cache[key] = value
117 return value
118
119 def __setitem__(self, key, value):
120 if self.writeback:

Callers

nothing calls this directly

Calls 3

BytesIOClass · 0.90
encodeMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected