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

Class _Line

src/pptx/text/layout.py:261–289  ·  view source on GitHub ↗

A candidate line broken at an even word boundary from a string of text, and a |_LineSource| value containing the text that remains after the line is broken at this spot.

Source from the content-addressed store, hash-verified

259
260
261class _Line(tuple):
262 """
263 A candidate line broken at an even word boundary from a string of text,
264 and a |_LineSource| value containing the text that remains after the line
265 is broken at this spot.
266 """
267
268 def __new__(cls, text, remainder):
269 return tuple.__new__(cls, (text, remainder))
270
271 def __gt__(self, other):
272 return len(self.text) > len(other.text)
273
274 def __lt__(self, other):
275 return not self.__gt__(other)
276
277 def __len__(self):
278 return len(self.text)
279
280 def __repr__(self):
281 return "'%s' => '%s'" % (self.text, self.remainder)
282
283 @property
284 def remainder(self):
285 return self[1]
286
287 @property
288 def text(self):
289 return self[0]
290
291
292class _Fonts(object):

Callers 2

fits_cx_pred_fixtureMethod · 0.90
__iter__Method · 0.85

Calls

no outgoing calls

Tested by 1

fits_cx_pred_fixtureMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…