MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / __getitem__

Method __getitem__

rat-sql-gap/seq2struct/utils/vocab.py:56–60  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

54 return len(self.elem_to_id)
55
56 def __getitem__(self, key):
57 # type: (int) -> Union[T, IndexedSet.Sentinel]
58 if isinstance(key, slice):
59 raise TypeError('Slices not supported.')
60 return self.id_to_elem[key]
61
62 def index(self, value):
63 # type: (T) -> int

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected