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
ff8d0873
Commit
ff8d0873
authored
Dec 30, 2015
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #25977: Fix typos in Lib/tokenize.py
Patch by John Walker.
parent
3cc8f4b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/tokenize.py
Lib/tokenize.py
+4
-4
No files found.
Lib/tokenize.py
View file @
ff8d0873
...
...
@@ -328,8 +328,8 @@ def untokenize(iterable):
Round-trip invariant for full input:
Untokenized source will match input source exactly
Round-trip invariant for limited in
t
put:
# Output bytes will tokenize
the
back to the input
Round-trip invariant for limited input:
# Output bytes will tokenize back to the input
t1 = [tok[:2] for tok in tokenize(f.readline)]
newcode = untokenize(t1)
readline = BytesIO(newcode).readline
...
...
@@ -465,10 +465,10 @@ def open(filename):
def tokenize(readline):
"""
The tokenize() generator requires one argment, readline, which
The tokenize() generator requires one arg
u
ment, readline, which
must be a callable object which provides the same interface as the
readline() method of built-in file objects. Each call to the function
should return one line of input as bytes. Alternately, readline
should return one line of input as bytes. Alternat
iv
ely, readline
can be a callable function terminating with StopIteration:
readline = open(myfile, 'rb').__next__ # Example of alternate readline
...
...
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