(self, block, lineno, indent)
Wraps a tokenize stream to systematically modify start/end.
Wraps a tokenize stream to systematically modify start/end.
Wraps a tokenize stream to systematically modify start / end .
def wrap_toks(self, block, lineno, indent):
        """Wraps a tokenize stream to systematically modify start/end."""
        tokens = tokenize.generate_tokens(self.gen_lines(block, indent).__next__)
        for type, value, (line0, col0), (line1, col1), line_text in tokens:
            line0 += lineno - 1
            line1 += lineno - 1
            # Don't bother updating the columns; this is too complicated
            # since line_text would also have to be updated and it would
            # still break for tokens spanning lines.  Let the user guess
            # that the column numbers for doctests are relative to the
            # end of the prompt string (PS1 or PS2).
            yield type, value, (line0, col0), (line1, col1), line_text
def wrap_toks ( self , block , lineno , indent ) : tokens = tokenize . generate_tokens ( self . gen_lines ( block , indent ) . __next__ ) for type , value , ( line0 , col0 ) , ( line1 , col1 ) , line_text in tokens : line0 += lineno - 1 line1 += lineno - 1 # Don't bother updating the columns; this is too complicated # since line_text would also have to be updated and it would # still break for tokens spanning lines.  Let the user guess # that the column numbers for doctests are relative to the # end of the prompt string (PS1 or PS2). yield type , value , ( line0 , col0 ) , ( line1 , col1 ) , line_text