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

Method preformat

Lib/pydoc.py:655–659  ·  view source on GitHub ↗

Format literal preformatted text.

(self, text)

Source from the content-addressed store, hash-verified

653 return self.section(title, *args)
654
655 def preformat(self, text):
656 """Format literal preformatted text."""
657 text = self.escape(text.expandtabs())
658 return replace(text, '\n\n', '\n \n', '\n\n', '\n \n',
659 ' ', '&nbsp;', '\n', '<br>\n')
660
661 def multicolumn(self, list, format):
662 """Format a list of items into a multi-column list."""

Callers

nothing calls this directly

Calls 3

escapeMethod · 0.80
replaceFunction · 0.70
expandtabsMethod · 0.45

Tested by

no test coverage detected