]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] Clarify the supported cases in the tokenize module (GH-105569) (#105575)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 9 Jun 2023 16:00:59 +0000 (09:00 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 16:00:59 +0000 (16:00 +0000)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Doc/library/tokenize.rst

index 11f569df2e7cde774f2d14f120796e373208824f..a903bff1da8f5ed7efa6795ecfdf5f4ae8b00d99 100644 (file)
@@ -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
 ----------------