Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
972cfb91
Commit
972cfb91
authored
Jan 19, 2012
by
Meador Inge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #2134: Clarify token.OP handling rationale in tokenize documentation.
parent
1b468af7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
Doc/library/tokenize.rst
Doc/library/tokenize.rst
+6
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/tokenize.rst
View file @
972cfb91
...
@@ -15,6 +15,12 @@ implemented in Python. The scanner in this module returns comments as tokens
...
@@ -15,6 +15,12 @@ implemented in Python. The scanner in this module returns comments as tokens
as well, making it useful for implementing "pretty-printers," including
as well, making it useful for implementing "pretty-printers," including
colorizers for on-screen displays.
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
type can be determined by checking the token ``string`` field on the
:term:`named tuple` returned from :func:`tokenize.tokenize` for the character
sequence that identifies a specific operator token.
The primary entry point is a :term:`generator`:
The primary entry point is a :term:`generator`:
.. function:: tokenize(readline)
.. function:: tokenize(readline)
...
...
Misc/NEWS
View file @
972cfb91
...
@@ -418,6 +418,9 @@ Extension Modules
...
@@ -418,6 +418,9 @@ Extension Modules
Documentation
Documentation
-------------
-------------
- Issue #2134: The tokenize documentation has been clarified to explain why
all operator and delimiter tokens are treated as token.OP tokens.
- Issue #13513: Fix io.IOBase documentation to correctly link to the
- Issue #13513: Fix io.IOBase documentation to correctly link to the
io.IOBase.readline method instead of the readline module.
io.IOBase.readline method instead of the readline module.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment