Formats the object into a sequence of lines with indent level
information. The return value is a list where each list item is a 2
valued tuple pair. The first item in the pair is an integer
representing the indentation level for that line and the second item
in the pair is the string value for the line.
The output of this function can be formatted into a single string
by calling nss.indented_format(). The reason this function returns
(level, string) pairs as opposed to an single indented string is to
support other text formatting systems with indentation controls.
- Parameters:
level (integer) - Initial indentation level, all subsequent indents are relative
to this starting level.
- Returns: [(level, string),...]
|