summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-06-09 15:59:37 (GMT)
committerGitHub <noreply@github.com>2023-06-09 15:59:37 (GMT)
commit1dd267af642ed6df05a1c106e9dafb8252d826e6 (patch)
tree8b3047163eafe841c0425b5206595d508d39049b /Doc/library
parent59f009e5898a006cdc8f5249be589de6edfe5cd0 (diff)
downloadcpython-1dd267af642ed6df05a1c106e9dafb8252d826e6.zip
cpython-1dd267af642ed6df05a1c106e9dafb8252d826e6.tar.gz
cpython-1dd267af642ed6df05a1c106e9dafb8252d826e6.tar.bz2
Clarify the supported cases in the tokenize module (#105569)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/tokenize.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index 41222a7..bffe930 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -22,6 +22,15 @@ the generic :data:`~token.OP` token type. The exact
type can be determined by checking the ``exact_type`` property on the
:term:`named tuple` returned from :func:`tokenize.tokenize`.
+
+.. warning::
+
+ Note that the functions in this module are only designed to parse
+ syntactically valid Python code (code that does not raise when parsed
+ using :func:`ast.parse`). The behavior of the functions in this module is
+ **undefined** when providing invalid Python code and it can change at any
+ point.
+
Tokenizing Input
----------------