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

Method iter_cloneable_placeholders

src/pptx/slide.py:118–131  ·  view source on GitHub ↗

Generate a reference to each cloneable placeholder in `notes_master`. These are the placeholders that should be cloned to a notes slide when the a new notes slide is created.

()

Source from the content-addressed store, hash-verified

116 """
117
118 def iter_cloneable_placeholders() -> Iterator[MasterPlaceholder]:
119 """Generate a reference to each cloneable placeholder in `notes_master`.
120
121 These are the placeholders that should be cloned to a notes slide when the a new notes
122 slide is created.
123 """
124 cloneable = (
125 PP_PLACEHOLDER.SLIDE_IMAGE,
126 PP_PLACEHOLDER.BODY,
127 PP_PLACEHOLDER.SLIDE_NUMBER,
128 )
129 for placeholder in notes_master.placeholders:
130 if placeholder.element.ph_type in cloneable:
131 yield placeholder
132
133 shapes = self.shapes
134 for placeholder in iter_cloneable_placeholders():

Calls

no outgoing calls