Skip to content

Commit 128837b

Browse files
committed
Clarify the supported cases in the tokenize module
Signed-off-by: Pablo Galindo <[email protected]>
1 parent b8fa7bd commit 128837b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/library/tokenize.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ the generic :data:`~token.OP` token type. The exact
2222
type can be determined by checking the ``exact_type`` property on the
2323
:term:`named tuple` returned from :func:`tokenize.tokenize`.
2424

25+
26+
.. warning::
27+
28+
Note that the functions in this module are only designed to parse
29+
syntactically valid Python code (code that does not raise when parsed
30+
using :func:`ast.parse`). The behavior of the functions in this module is
31+
**undefined** when providing invalid Python code and it can change at any
32+
point.
33+
2534
Tokenizing Input
2635
----------------
2736

0 commit comments

Comments
 (0)