MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Tools/peg_generator/pegen/tokenizer.py:26–36  ·  view source on GitHub ↗
(
        self, tokengen: Iterator[tokenize.TokenInfo], *, path: str = "", verbose: bool = False
    )

Source from the content-addressed store, hash-verified

24 _tokens: list[tokenize.TokenInfo]
25
26 def __init__(
27 self, tokengen: Iterator[tokenize.TokenInfo], *, path: str = "", verbose: bool = False
28 ):
29 self._tokengen = tokengen
30 self._tokens = []
31 self._index = 0
32 self._verbose = verbose
33 self._lines: dict[int, str] = {}
34 self._path = path
35 if verbose:
36 self.report(False, False)
37
38 def getnext(self) -> tokenize.TokenInfo:
39 """Return the next token and updates the index."""

Callers

nothing calls this directly

Calls 1

reportMethod · 0.95

Tested by

no test coverage detected