If a class defines it, this special method is called
whenever a value is retrieved from a sequence or
mapping (dictionary-like object) using the syntax
the sequence or mapping and
is a position in a sequence,
or a key in a mapping.
Here is the calling sequence:
def __getitem__(self, i): ...
The method either returns the corresponding item or
raises an appropriate exception:
IndexError for sequences or
KeyError for mappings.