A `ViewList` with string-specific methods.
Method | get_2 |
Undocumented |
Method | get |
Extract and return a StringList of indented lines of text. |
Method | get |
Return a contiguous block of text. |
Method | pad |
Pad all double-width characters in `self` appending `pad_char`. |
Method | replace |
Replace all occurrences of substring `old` with `new`. |
Method | trim |
Trim `length` characters off the beginning of each item, in-place, from index `start` to `end`. No whitespace-checking is done on the trimmed text. Does not affect slice parent. |
Inherited from ViewList
:
Method | __add__ |
Undocumented |
Method | __contains__ |
Undocumented |
Method | __delitem__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __iadd__ |
Undocumented |
Method | __imul__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __le__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __mul__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __radd__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setitem__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | append |
Undocumented |
Method | count |
Undocumented |
Method | disconnect |
Break link between this list and parent list. |
Method | extend |
Undocumented |
Method | index |
Undocumented |
Method | info |
Return source & offset for index `i`. |
Method | insert |
Undocumented |
Method | offset |
Return offset for index `i`. |
Method | pop |
Undocumented |
Method | pprint |
Print the list in `grep` format (`source:offset:value` lines) |
Method | remove |
Undocumented |
Method | reverse |
Undocumented |
Method | sort |
Undocumented |
Method | source |
Return source for index `i`. |
Method | trim |
Remove items from the end of the list, without touching the parent. |
Method | trim |
Remove items from the start of the list, without touching the parent. |
Method | xitems |
Return iterator yielding (source, offset, value) tuples. |
Instance Variable | data |
The actual list of data, flattened from various sources. |
Instance Variable | items |
A list of (source, offset) pairs, same length as `self.data`: the source of each line and the offset of each line from the beginning of its source. |
Instance Variable | parent |
The parent list. |
Instance Variable | parent |
Offset of this list from the beginning of the parent list. |
Method | __cast |
Undocumented |
Extract and return a StringList of indented lines of text. Collect all lines with indentation, determine the minimum indentation, remove the minimum indentation from all indented lines (unless `strip_indent` is false), and return them. All lines up to but not including the first unindented line will be returned. :Parameters: - `start`: The index of the first line to examine. - `until_blank`: Stop collecting at the first blank line if true. - `strip_indent`: Strip common leading indent if true (default). - `block_indent`: The indent of the entire block, if known. - `first_indent`: The indent of the first line, if known. :Return: - a StringList of indented lines with minimum indent removed; - the amount of the indent; - a boolean: did the indented block finish with a blank line or EOF?
Return a contiguous block of text. If `flush_left` is true, raise `UnexpectedIndentationError` if an indented line is encountered before the text block ends (with a blank line).