class documentation

class _LineSet: (source)

View In Hierarchy

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_disable_after Get an unclosed disable, if any, that starts after line.
Method set_line Set whether a given line is a member of the set.
Method start_range Start a range of lines that are either included/excluded from the set.
Property lines Undocumented
Instance Variable _lines Undocumented
Instance Variable _transitions Undocumented
def __contains__(self, line): (source)

Return if a line is a member of the set.

def __init__(self): (source)

Undocumented

def get_disable_after(self, line): (source)

Get an unclosed disable, if any, that starts after line.

def set_line(self, line, membership): (source)

Set whether a given line is a member of the set.

def start_range(self, line, membership): (source)

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().

Undocumented

Undocumented

_transitions: list = (source)

Undocumented