MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __getitem__

Method __getitem__

lib/sqlalchemy/sql/_util_cy.py:118–124  ·  view source on GitHub ↗
(self: anon_map, key: _AM_KEY, /)

Source from the content-addressed store, hash-verified

116 if cython.compiled:
117
118 def __getitem__(self: anon_map, key: _AM_KEY, /) -> _AM_VALUE:
119 self_dict: dict = self # type: ignore[type-arg]
120
121 if key in self_dict:
122 return self_dict[key] # type: ignore[no-any-return]
123 else:
124 return self._add_missing(key) # type: ignore[no-any-return]
125
126 def __missing__(self: anon_map, key: _AM_KEY, /) -> int:
127 return self._add_missing(key) # type: ignore[no-any-return]

Callers

nothing calls this directly

Calls 1

_add_missingMethod · 0.95

Tested by

no test coverage detected