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

Method is_empty

src/pptx/oxml/text.py:114–125  ·  view source on GitHub ↗

True if only a single empty `a:p` element is present.

(self)

Source from the content-addressed store, hash-verified

112
113 @property
114 def is_empty(self) -> bool:
115 """True if only a single empty `a:p` element is present."""
116 ps = self.p_lst
117 if len(ps) > 1:
118 return False
119
120 if not ps:
121 raise InvalidXmlError("p:txBody must have at least one a:p")
122
123 if ps[0].text != "":
124 return False
125 return True
126
127 @classmethod
128 def new(cls):

Callers

nothing calls this directly

Calls 1

InvalidXmlErrorClass · 0.90

Tested by

no test coverage detected