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

Method _insert_from_ordered_sequence

src/pptx/text/layout.py:202–212  ·  view source on GitHub ↗

Insert the new values contained in *seq* into this tree such that a balanced tree is produced.

(self, seq)

Source from the content-addressed store, hash-verified

200 return mid, greater, lesser
201
202 def _insert_from_ordered_sequence(self, seq):
203 """
204 Insert the new values contained in *seq* into this tree such that
205 a balanced tree is produced.
206 """
207 if len(seq) == 0:
208 return
209 mid, greater, lesser = self._bisect(seq)
210 self.insert(mid)
211 self._insert_from_ordered_sequence(greater)
212 self._insert_from_ordered_sequence(lesser)
213
214
215class _LineSource(object):

Callers 1

from_ordered_sequenceMethod · 0.80

Calls 2

_bisectMethod · 0.95
insertMethod · 0.95

Tested by

no test coverage detected