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

Method __bool__

src/pptx/text/layout.py:227–232  ·  view source on GitHub ↗

Gives this object boolean behaviors (in Python 3). bool(line_source) is False if it contains the empty string or whitespace only.

(self)

Source from the content-addressed store, hash-verified

225 self._text = text
226
227 def __bool__(self):
228 """
229 Gives this object boolean behaviors (in Python 3). bool(line_source)
230 is False if it contains the empty string or whitespace only.
231 """
232 return self._text.strip() != ""
233
234 def __eq__(self, other):
235 return self._text == other._text

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected