summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-03-16 10:34:31 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-03-16 10:34:31 (GMT)
commitc2077b0d9b5bf99768c6f396bf7ae6c41b682465 (patch)
tree8a1dc9e646a99465f4f1c9961012d52ef183e653 /Lib/lib2to3
parent6905de14fef619767693f8bd91996bc7e99ca9fe (diff)
downloadcpython-c2077b0d9b5bf99768c6f396bf7ae6c41b682465.zip
cpython-c2077b0d9b5bf99768c6f396bf7ae6c41b682465.tar.gz
cpython-c2077b0d9b5bf99768c6f396bf7ae6c41b682465.tar.bz2
#11565: Fix several typos. Patch by Piotr Kasprzyk.
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r--Lib/lib2to3/fixes/fix_metaclass.py2
-rw-r--r--Lib/lib2to3/pgen2/conv.py4
-rw-r--r--Lib/lib2to3/pytree.py4
-rw-r--r--Lib/lib2to3/tests/data/py2_test_grammar.py2
-rw-r--r--Lib/lib2to3/tests/data/py3_test_grammar.py2
5 files changed, 7 insertions, 7 deletions
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 @@ def fixup_parse_tree(cls_node):
"""
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 @@ class Converter(grammar.Grammar):
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 @@ class Converter(grammar.Grammar):
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 @@ class WildcardPattern(BasePattern):
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 @@ class GrammarTests(unittest.TestCase):
### 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 @@ class GrammarTests(unittest.TestCase):
### 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()