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

Function generate_tokens

Lib/tokenize.py:500–506  ·  view source on GitHub ↗

Tokenize a source reading Python code as unicode strings. This has the same API as tokenize(), except that it expects the *readline* callable to return str objects instead of bytes.

(readline)

Source from the content-addressed store, hash-verified

498 yield from _generate_tokens_from_c_tokenizer(rl_gen.__next__, encoding, extra_tokens=True)
499
500def generate_tokens(readline):
501 """Tokenize a source reading Python code as unicode strings.
502
503 This has the same API as tokenize(), except that it expects the *readline*
504 callable to return str objects instead of bytes.
505 """
506 return _generate_tokens_from_c_tokenizer(readline, extra_tokens=True)
507
508def _main(args=None):
509 import argparse

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…