-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
The docs for tokenize.untokenize are somewhat confusing
regarding the return type of the function. The second paragraphs says:
The reconstructed script is returned as a single string.
while the third paragraph clarifies that it can be both str and bytes:
cpython/Doc/library/tokenize.rst
Lines 100 to 102 in 6c52ada
It returns bytes, encoded using the :data:`~token.ENCODING` token, which | |
is the first token sequence output by :func:`.tokenize`. If there is no | |
encoding token in the input, it returns a str instead. |
I think we should remove the first sentence (The reconstructed script is returned as a single string.
)
because it's wrong and if someone is just skimming the docs they might not realize that the full
explanation is only in the next paragraph.
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Todo