fix an ambiguity in the grammar from the implementation of extended unpacking
(one which was strangely "resolved" by pgen)
This also kills the unused testlist1 rule and fixes parse tree validation of
extended unpacking.
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 9e5d5c1..0ac49da 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -242,6 +242,12 @@
(0, '', 2, -1)],
terminals)
+ def test_extended_unpacking(self):
+ self.check_suite("*a = y")
+ self.check_suite("x, *b, = m")
+ self.check_suite("[*a, *b] = y")
+ self.check_suite("for [*x, b] in x: pass")
+
#
# Second, we take *invalid* trees and make sure we get ParserError