class documentation
class _LineSet: (source)
A set of line numbers. The data structure is optimized to represent the union of a sparse set of integers and ranges of non-negative integers. This supports the two styles of directives: those after a statement apply only to that line and those on their own line apply until countered by the opposing directive.
Method | __contains__ |
Return if a line is a member of the set. |
Method | __init__ |
Undocumented |
Method | get |
Get an unclosed disable, if any, that starts after line. |
Method | set |
Set whether a given line is a member of the set. |
Method | start |
Start a range of lines that are either included/excluded from the set. |
Property | lines |
Undocumented |
Instance Variable | _lines |
Undocumented |
Instance Variable | _transitions |
Undocumented |
Start a range of lines that are either included/excluded from the set. Args: line: A line number. membership: If True, lines >= line are included in the set (starting a range), otherwise they are excluded (ending a range). Raises: ValueError: if line is less than that of a previous call to start_range().