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

Method __getitem__

src/pptx/chart/chart.py:270–277  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

268 self._chart = chart
269
270 def __getitem__(self, index):
271 xCharts = self._plotArea.xCharts
272 if isinstance(index, slice):
273 plots = [PlotFactory(xChart, self._chart) for xChart in xCharts]
274 return plots[index]
275 else:
276 xChart = xCharts[index]
277 return PlotFactory(xChart, self._chart)
278
279 def __len__(self):
280 return len(self._plotArea.xCharts)

Callers

nothing calls this directly

Calls 1

PlotFactoryFunction · 0.90

Tested by

no test coverage detected