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

Method __getitem__

Lib/dbm/sqlite3.py:92–97  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

90 return row[0]
91
92 def __getitem__(self, key):
93 with self._execute(LOOKUP_KEY, (key,)) as cu:
94 row = cu.fetchone()
95 if not row:
96 raise KeyError(key)
97 return row[0]
98
99 def __setitem__(self, key, value):
100 self._execute(STORE_KV, (key, value))

Callers

nothing calls this directly

Calls 2

_executeMethod · 0.95
fetchoneMethod · 0.80

Tested by

no test coverage detected