MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _getitem

Method _getitem

lib/sqlalchemy/orm/path_registry.py:807–813  ·  view source on GitHub ↗
(self, entity: Any)

Source from the content-addressed store, hash-verified

805 return self._cache.pop(key, default)
806
807 def _getitem(self, entity: Any) -> Any:
808 if isinstance(entity, (int, slice)):
809 return self.path[entity]
810 elif isinstance(entity, PathToken):
811 return _TokenRegistry(self, entity)
812 else:
813 return self._cache[entity]
814
815 if not TYPE_CHECKING:
816 __getitem__ = _getitem

Callers

nothing calls this directly

Calls 1

_TokenRegistryClass · 0.85

Tested by

no test coverage detected