#11565: Fix several typos. Patch by Piotr Kasprzyk.
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index f403fd6..c86fbea 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -48,7 +48,7 @@
"""
for node in cls_node.children:
if node.type == syms.suite:
- # already in the prefered format, do nothing
+ # already in the preferred format, do nothing
return
# !%@#! oneliners have no suite node, we have to fake one up
diff --git a/Lib/lib2to3/pgen2/conv.py b/Lib/lib2to3/pgen2/conv.py
index 5d788a1..28fbb0b 100644
--- a/Lib/lib2to3/pgen2/conv.py
+++ b/Lib/lib2to3/pgen2/conv.py
@@ -51,7 +51,7 @@
self.finish_off()
def parse_graminit_h(self, filename):
- """Parse the .h file writen by pgen. (Internal)
+ """Parse the .h file written by pgen. (Internal)
This file is a sequence of #define statements defining the
nonterminals of the grammar as numbers. We build two tables
@@ -82,7 +82,7 @@
return True
def parse_graminit_c(self, filename):
- """Parse the .c file writen by pgen. (Internal)
+ """Parse the .c file written by pgen. (Internal)
The file looks as follows. The first two lines are always this:
diff --git a/Lib/lib2to3/pytree.py b/Lib/lib2to3/pytree.py
index c2fa800..179caca 100644
--- a/Lib/lib2to3/pytree.py
+++ b/Lib/lib2to3/pytree.py
@@ -658,8 +658,8 @@
content: optional sequence of subsequences of patterns;
if absent, matches one node;
if present, each subsequence is an alternative [*]
- min: optinal minumum number of times to match, default 0
- max: optional maximum number of times tro match, default HUGE
+ min: optional minimum number of times to match, default 0
+ max: optional maximum number of times to match, default HUGE
name: optional name assigned to this match
[*] Thus, if content is [[a, b, c], [d, e], [f, g, h]] this is
diff --git a/Lib/lib2to3/tests/data/py2_test_grammar.py b/Lib/lib2to3/tests/data/py2_test_grammar.py
index 17f9f4c..b5a4137 100644
--- a/Lib/lib2to3/tests/data/py2_test_grammar.py
+++ b/Lib/lib2to3/tests/data/py2_test_grammar.py
@@ -316,7 +316,7 @@
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
- # verify statments that end with semi-colons
+ # verify statements that end with semi-colons
x = 1; pass; del x;
foo()
diff --git a/Lib/lib2to3/tests/data/py3_test_grammar.py b/Lib/lib2to3/tests/data/py3_test_grammar.py
index 977f0b8..c0bf7f2 100644
--- a/Lib/lib2to3/tests/data/py3_test_grammar.py
+++ b/Lib/lib2to3/tests/data/py3_test_grammar.py
@@ -356,7 +356,7 @@
### simple_stmt: small_stmt (';' small_stmt)* [';']
x = 1; pass; del x
def foo():
- # verify statments that end with semi-colons
+ # verify statements that end with semi-colons
x = 1; pass; del x;
foo()