Package lib :: Package text :: Module string
[hide private]
[frames] | no frames]

Module string

source code

Module for building documentation.

Functions [hide private]
str
strip_lead(text)
Strip the leading whitespace from the given text.
source code
 
to_docstring(data)
Convert the text to that of a docstring, dependent on the text level.
source code
Variables [hide private]
  TITLE = 3
  SECTION = 2
  SUBSECTION = 1
  PARAGRAPH = 0
  LIST = 10
  __package__ = None
hash(x)
Function Details [hide private]

strip_lead(text)

source code 

Strip the leading whitespace from the given text.

Parameters:
  • text (str) - The text to strip the leading whitespace from.
Returns: str
The text with leading whitespace removed.

to_docstring(data)

source code 

Convert the text to that of a docstring, dependent on the text level.

Parameters:
  • data (list of lists of int and str) - The lists of constants and text to convert into a properly formatted docstring.