diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-09-13 03:43:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 03:43:04 (GMT) |
commit | 5513e888e9a742156c35ce7ab628407d8cf9e1f0 (patch) | |
tree | 04df5d47dfaf05ce5e8171363ec2525597f169c6 /Doc/library | |
parent | 94eb2d5b73d07bc447f1fe19923b4c3259734b9c (diff) | |
download | cpython-5513e888e9a742156c35ce7ab628407d8cf9e1f0.zip cpython-5513e888e9a742156c35ce7ab628407d8cf9e1f0.tar.gz cpython-5513e888e9a742156c35ce7ab628407d8cf9e1f0.tar.bz2 |
[3.6] bpo-31394: Clarify documentation about token type attribute (GH-3469) (GH-3525)
Make it clear that Ellipsis tokens also have type attribute set to token.OP..
(cherry picked from commit 5f8fbf917ebf2398aa75a1f271617e2e50ab7c88)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/tokenize.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst index ff55aac..afed36b 100644 --- a/Doc/library/tokenize.rst +++ b/Doc/library/tokenize.rst @@ -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`. |