class NumberLines(object): (source)
Insert linenumber-tokens at the start of every code line.
Arguments
tokens -- iterable of (classes, value) tuples startline -- first line number endline -- last line number
Iterating over an instance yields the tokens with a (['ln'], '<the line number>') token added for every code line. Multi-line tokens are splitted.