-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-parser
Description
Documentation
In #128031, it was deemed too risky to change untokenize()
to more closely match the original input string. We should update the docstring of untokenize
to reflect that and prevent confusion in the (rare) case when untokenize
does not match the input.
The docs already make that clear so we can simply reuse that explanation:
cpython/Doc/library/tokenize.rst
Lines 94 to 98 in 2228e92
The reconstructed script is returned as a single string. The result is | |
guaranteed to tokenize back to match the input so that the conversion is | |
lossless and round-trips are assured. The guarantee applies only to the | |
token type and token string as the spacing between tokens (column | |
positions) may change. |
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-parser
Projects
Status
Todo