(code)
return
Find the offsets in a byte code which are start of lines in the source.

    Generate pairs (offset, lineno)
Find the offsets in a byte code which are start of lines in the source.
Find the offsets in a byte code which are start of lines in the source .
def findlinestarts(code):
    """Find the offsets in a byte code which are start of lines in the source.

    Generate pairs (offset, lineno)
    """
    lastline = None
    for start, end, line in code.co_lines():
        if line is not None and line != lastline:
            lastline = line
            yield start, line
    return
def findlinestarts ( code ) : lastline = None for start , end , line in code . co_lines ( ) : if line is not None and line != lastline : lastline = line yield start , line return