Kaydet (Commit) 5513e888 authored tarafından Mariatta's avatar Mariatta Kaydeden (comit) GitHub

[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 5f8fbf91)
üst 94eb2d5b
......@@ -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`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment