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
2a58b063
Commit
2a58b063
authored
May 30, 2019
by
Anthony Sottile
Committed by
Miss Islington (bot)
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686)
https://bugs.python.org/issue5028
parent
eea47e09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Doc/library/tokenize.rst
Doc/library/tokenize.rst
+2
-2
Lib/lib2to3/pgen2/tokenize.py
Lib/lib2to3/pgen2/tokenize.py
+1
-1
Lib/tokenize.py
Lib/tokenize.py
+1
-1
No files found.
Doc/library/tokenize.rst
View file @
2a58b063
...
...
@@ -39,8 +39,8 @@ The primary entry point is a :term:`generator`:
column where the token begins in the source; a 2-tuple ``(erow, ecol)`` of
ints specifying the row and column where the token ends in the source; and
the line on which the token was found. The line passed (the last tuple item)
is the *physical* line
; continuation lines are included. The 5 tuple is
returned as a :term:`named tuple`
with the field names:
is the *physical* line
. The 5 tuple is returned as a :term:`named tuple`
with the field names:
``type string start end line``.
The returned :term:`named tuple` has an additional property named
...
...
Lib/lib2to3/pgen2/tokenize.py
View file @
2a58b063
...
...
@@ -346,7 +346,7 @@ def generate_tokens(readline):
column where the token begins in the source; a 2-tuple (erow, ecol) of
ints specifying the row and column where the token ends in the source;
and the line on which the token was found. The line passed is the
physical line
; continuation lines are included
.
physical line.
"""
lnum
=
parenlev
=
continued
=
0
contstr
,
needcont
=
''
,
0
...
...
Lib/tokenize.py
View file @
2a58b063
...
...
@@ -415,7 +415,7 @@ def tokenize(readline):
column where the token begins in the source; a 2-tuple (erow, ecol) of
ints specifying the row and column where the token ends in the source;
and the line on which the token was found. The line passed is the
physical line
; continuation lines are included
.
physical line.
The first token sequence will always be an ENCODING token
which tells you which encoding was used to decode the bytes stream.
...
...
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