]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document token.TYPE_COMMENT
authorGuido van Rossum <guido@python.org>
Mon, 28 Jan 2019 17:54:14 +0000 (09:54 -0800)
committerGuido van Rossum <guido@python.org>
Mon, 28 Jan 2019 17:54:14 +0000 (09:54 -0800)
Doc/library/token.rst

index 5358eb5a291e6377cb251a47526fa0f084e99cdb..4936e9aa08f43d0215430600746f245510369da5 100644 (file)
@@ -69,6 +69,13 @@ the :mod:`tokenize` module.
    always be an ``ENCODING`` token.
 
 
+.. data:: TYPE_COMMENT
+
+   Token value indicating that a type comment was recognized.  Such
+   tokens are only produced when :func:`ast.parse()` is invoked with
+   ``type_comments=True``.
+
+
 .. versionchanged:: 3.5
    Added :data:`AWAIT` and :data:`ASYNC` tokens.
 
@@ -78,3 +85,6 @@ the :mod:`tokenize` module.
 .. versionchanged:: 3.7
    Removed :data:`AWAIT` and :data:`ASYNC` tokens. "async" and "await" are
    now tokenized as :data:`NAME` tokens.
+
+.. versionchanged:: 3.8
+   Added :data:`TYPE_COMMENT`.