Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 598 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 598 Bytes

token-utils

This project consists of a single module which is extracted from the ideas package. Its purpose is to simplify manipulations of tokens from Python's tokenize module. One of its features is that, unlike Python's version, the following is always guaranteed:

from token_utils import tokenize, untokenize

source = "Arbitrary Python code here"

assert source == untokenize(tokenize(source))

See ideas documentation for more information