def line( loc, strg ):
    lastCR = strg.rfind("\n", 0, loc)
    nextCR = strg.find("\n", loc)
    if nextCR >= 0:
        return strg[lastCR+1:nextCR]
    else:
        return strg[lastCR+1:]
Returns the line of text containing loc within a string, counting newlines as line separators.
dataset/ETHPy150Open pypa/pip/pip/_vendor/pyparsing.py/line