diff options
-rw-r--r-- | Lib/test/output/test_grammar | 1 | ||||
-rw-r--r-- | Lib/test/test_grammar.py | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/output/test_grammar b/Lib/test/output/test_grammar index 927b4fe..5d0c177 100644 --- a/Lib/test/output/test_grammar +++ b/Lib/test/output/test_grammar @@ -60,4 +60,5 @@ classdef [(1, 'Apple'), (1, 'Banana'), (1, 'Coconut'), (2, 'Apple'), (2, 'Banana'), (2, 'Coconut'), (3, 'Apple'), (3, 'Banana'), (3, 'Coconut'), (4, 'Apple'), (4, 'Banana'), (4, 'Coconut'), (5, 'Apple'), (5, 'Banana'), (5, 'Coconut')] [(1, 'Banana'), (1, 'Coconut'), (2, 'Banana'), (2, 'Coconut'), (3, 'Banana'), (3, 'Coconut'), (4, 'Banana'), (4, 'Coconut'), (5, 'Banana'), (5, 'Coconut')] [0, 0, 0] +[[1, 2], [3, 4], [5, 6]] [('Boeing', 'Airliner'), ('Boeing', 'Engine'), ('Ford', 'Engine'), ('Macdonalds', 'Cheeseburger')] diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 75a55b9..04b1431 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -661,6 +661,11 @@ def test_in_func(l): print test_in_func(nums) +def test_nested_front(): + print [[y for y in [x, x + 1]] for x in [1,3,5]] + +test_nested_front() + check_syntax("[i, s for i in nums for s in strs]") check_syntax("[x if y]") |