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

Method find_max

src/pptx/text/layout.py:130–142  ·  view source on GitHub ↗

Return the largest item in or under this node that satisfies *predicate*.

(self, predicate, max_=None)

Source from the content-addressed store, hash-verified

128 self._greater = None
129
130 def find_max(self, predicate, max_=None):
131 """
132 Return the largest item in or under this node that satisfies
133 *predicate*.
134 """
135 if predicate(self.value):
136 max_ = self.value
137 next_node = self._greater
138 else:
139 next_node = self._lesser
140 if next_node is None:
141 return max_
142 return next_node.find_max(predicate, max_)
143
144 @classmethod
145 def from_ordered_sequence(cls, iseq):

Calls

no outgoing calls