MCPcopy Index your code
hub / github.com/python/cpython / fill

Method fill

Lib/textwrap.py:361–368  ·  view source on GitHub ↗

fill(text : string) -> string Reformat the single paragraph in 'text' to fit in lines of no more than 'self.width' columns, and return a new string containing the entire wrapped paragraph.

(self, text)

Source from the content-addressed store, hash-verified

359 return self._wrap_chunks(chunks)
360
361 def fill(self, text):
362 """fill(text : string) -> string
363
364 Reformat the single paragraph in 'text' to fit in lines of no
365 more than 'self.width' columns, and return a new string
366 containing the entire wrapped paragraph.
367 """
368 return "\n".join(self.wrap(text))
369
370
371# -- Convenience interface ---------------------------------------------

Callers 3

fillFunction · 0.95
shortenFunction · 0.95
test_whitespaceMethod · 0.95

Calls 2

wrapMethod · 0.95
joinMethod · 0.45

Tested by 1

test_whitespaceMethod · 0.76