aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-12-30 01:41:58 +0200
committerBerker Peksag <berker.peksag@gmail.com>2015-12-30 01:41:58 +0200
commitff8d0873aabe54009af533f9f6a76fa91392a80a (patch)
treee9a771f4efca79a4e62b4b90242b7a053aebdd30 /Lib/tokenize.py
parentmake recording and reporting errors and nonlocal and global directives more r... (diff)
downloadcpython-ff8d0873aabe54009af533f9f6a76fa91392a80a.tar.gz
cpython-ff8d0873aabe54009af533f9f6a76fa91392a80a.tar.bz2
cpython-ff8d0873aabe54009af533f9f6a76fa91392a80a.zip
Issue #25977: Fix typos in Lib/tokenize.py
Patch by John Walker.
Diffstat (limited to 'Lib/tokenize.py')
-rw-r--r--Lib/tokenize.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 65d06e53f3b..9fd676c5b24 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -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 intput:
- # 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 argument, 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. Alternatively, readline
can be a callable function terminating with StopIteration:
readline = open(myfile, 'rb').__next__ # Example of alternate readline