diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-08-17 13:13:22 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-08-17 13:13:22 (GMT) |
commit | e0c69161bc9d4e9deca4fc0add189b4df9cce8cb (patch) | |
tree | 577f43f5da23af8cd3f34422599627cef6a2902f /Lib/lib2to3 | |
parent | 1d8e7dbf1ab5f206016de6ccd9ce3962d264bd9b (diff) | |
parent | b5bc353b8893461b0ecdf0e4bc2b299ef2b19bc0 (diff) | |
download | cpython-e0c69161bc9d4e9deca4fc0add189b4df9cce8cb.zip cpython-e0c69161bc9d4e9deca4fc0add189b4df9cce8cb.tar.gz cpython-e0c69161bc9d4e9deca4fc0add189b4df9cce8cb.tar.bz2 |
#18741: merge with 3.3.
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r-- | Lib/lib2to3/fixes/fix_itertools.py | 4 | ||||
-rw-r--r-- | Lib/lib2to3/fixes/fix_metaclass.py | 2 | ||||
-rw-r--r-- | Lib/lib2to3/tests/test_parser.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/lib2to3/fixes/fix_itertools.py b/Lib/lib2to3/fixes/fix_itertools.py index 63346b9..8e78d6c 100644 --- a/Lib/lib2to3/fixes/fix_itertools.py +++ b/Lib/lib2to3/fixes/fix_itertools.py @@ -34,8 +34,8 @@ class FixItertools(fixer_base.BaseFix): # Remove the 'itertools' prefix = it.prefix it.remove() - # Replace the node wich contains ('.', 'function') with the - # function (to be consistant with the second part of the pattern) + # Replace the node which contains ('.', 'function') with the + # function (to be consistent with the second part of the pattern) dot.remove() func.parent.replace(func) diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py index 7d4d002..d4f99a3 100644 --- a/Lib/lib2to3/fixes/fix_metaclass.py +++ b/Lib/lib2to3/fixes/fix_metaclass.py @@ -71,7 +71,7 @@ def fixup_parse_tree(cls_node): def fixup_simple_stmt(parent, i, stmt_node): """ if there is a semi-colon all the parts count as part of the same simple_stmt. We just want the __metaclass__ part so we move - everything efter the semi-colon into its own simple_stmt node + everything after the semi-colon into its own simple_stmt node """ for semi_ind, node in enumerate(stmt_node.children): if node.type == token.SEMI: # *sigh* diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index 3968e6a..09b439a 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -77,7 +77,7 @@ class TestRaiseChanges(GrammarTest): self.invalid_syntax("raise E from") -# Adapated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef +# Adaptated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef class TestFunctionAnnotations(GrammarTest): def test_1(self): self.validate("""def f(x) -> list: pass""") |