MCPcopy Create free account
hub / github.com/scanny/python-pptx / __getitem__

Method __getitem__

src/pptx/table.py:435–440  ·  view source on GitHub ↗

Provides indexed access, (e.g. 'cells[0]').

(self, idx: int)

Source from the content-addressed store, hash-verified

433 self._tr = tr
434
435 def __getitem__(self, idx: int) -> _Cell:
436 """Provides indexed access, (e.g. 'cells[0]')."""
437 if idx < 0 or idx >= len(self._tr.tc_lst):
438 msg = "cell index [%d] out of range" % idx
439 raise IndexError(msg)
440 return _Cell(self._tr.tc_lst[idx], self)
441
442 def __iter__(self) -> Iterator[_Cell]:
443 """Provides iterability."""

Callers

nothing calls this directly

Calls 1

_CellClass · 0.85

Tested by

no test coverage detected