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

Method index

src/pptx/slide.py:285–293  ·  view source on GitHub ↗

Map `slide` to its zero-based position in this slide sequence. Raises |ValueError| on *slide* not present.

(self, slide: Slide)

Source from the content-addressed store, hash-verified

283 return slide
284
285 def index(self, slide: Slide) -> int:
286 """Map `slide` to its zero-based position in this slide sequence.
287
288 Raises |ValueError| on *slide* not present.
289 """
290 for idx, this_slide in enumerate(self):
291 if this_slide == slide:
292 return idx
293 raise ValueError("%s is not in slide collection" % slide)
294
295
296class SlideLayout(_BaseSlide):

Calls

no outgoing calls