diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2015-08-02 02:57:22 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2015-08-02 02:57:22 (GMT) |
commit | 13db76a9743f4a414339efb1cfd5b3365806e463 (patch) | |
tree | 3fca3ce44903ec4b8934ba55f7d6a5aedeb3d092 /Lib | |
parent | 1824544d828a25775d221f87caf325e12ab41a06 (diff) | |
parent | ce17f764757306cdcdf1555c67dd0eed8e6bca8a (diff) | |
download | cpython-13db76a9743f4a414339efb1cfd5b3365806e463.zip cpython-13db76a9743f4a414339efb1cfd5b3365806e463.tar.gz cpython-13db76a9743f4a414339efb1cfd5b3365806e463.tar.bz2 |
Issue #23182: Merge with 3.4
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_grammar.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 9b41df1..8f0cf16 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -308,27 +308,27 @@ class GrammarTests(unittest.TestCase): # argument annotation tests def f(x) -> list: pass self.assertEqual(f.__annotations__, {'return': list}) - def f(x:int): pass + def f(x: int): pass self.assertEqual(f.__annotations__, {'x': int}) - def f(*x:str): pass + def f(*x: str): pass self.assertEqual(f.__annotations__, {'x': str}) - def f(**x:float): pass + def f(**x: float): pass self.assertEqual(f.__annotations__, {'x': float}) - def f(x, y:1+2): pass + def f(x, y: 1+2): pass self.assertEqual(f.__annotations__, {'y': 3}) - def f(a, b:1, c:2, d): pass + def f(a, b: 1, c: 2, d): pass self.assertEqual(f.__annotations__, {'b': 1, 'c': 2}) - def f(a, b:1, c:2, d, e:3=4, f=5, *g:6): pass + def f(a, b: 1, c: 2, d, e: 3 = 4, f=5, *g: 6): pass self.assertEqual(f.__annotations__, - {'b': 1, 'c': 2, 'e': 3, 'g': 6}) - def f(a, b:1, c:2, d, e:3=4, f=5, *g:6, h:7, i=8, j:9=10, - **k:11) -> 12: pass + {'b': 1, 'c': 2, 'e': 3, 'g': 6}) + def f(a, b: 1, c: 2, d, e: 3 = 4, f=5, *g: 6, h: 7, i=8, j: 9 = 10, + **k: 11) -> 12: pass self.assertEqual(f.__annotations__, - {'b': 1, 'c': 2, 'e': 3, 'g': 6, 'h': 7, 'j': 9, - 'k': 11, 'return': 12}) + {'b': 1, 'c': 2, 'e': 3, 'g': 6, 'h': 7, 'j': 9, + 'k': 11, 'return': 12}) # Check for issue #20625 -- annotations mangling class Spam: - def f(self, *, __kw:1): + def f(self, *, __kw: 1): pass class Ham(Spam): pass self.assertEqual(Spam.f.__annotations__, {'_Spam__kw': 1}) |