]> granicus.if.org Git - python/commitdiff
[3.6] bpo-31394: Clarify documentation about token type attribute (GH-3469) (GH-3525)
authorMariatta <Mariatta@users.noreply.github.com>
Wed, 13 Sep 2017 03:43:04 +0000 (20:43 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Sep 2017 03:43:04 +0000 (20:43 -0700)
Make it clear that Ellipsis tokens also have type attribute set to token.OP..
(cherry picked from commit 5f8fbf917ebf2398aa75a1f271617e2e50ab7c88)

Doc/library/tokenize.rst

index ff55aacbd44c5b50e4c8afeff3b7ff2559b051b2..afed36b9e46170a16add0af32e784167ef184de0 100644 (file)
@@ -16,8 +16,9 @@ implemented in Python.  The scanner in this module returns comments as tokens
 as well, making it useful for implementing "pretty-printers," including
 colorizers for on-screen displays.
 
-To simplify token stream handling, all :ref:`operators` and :ref:`delimiters`
-tokens are returned using the generic :data:`token.OP` token type.  The exact
+To simplify token stream handling, all :ref:`operator <operators>` and
+:ref:`delimiter <delimiters>` tokens and :data:`Ellipsis` are returned using
+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`.