Commits

Mark Dickinson committed c805763

Issue #14965: Fix missing support for starred assignments in Tools/parser/unparse.py.

  • Participants
  • Parent commits d5b7be0
  • Branches 3.2

Comments (0)

Files changed (3)

 
 - Issue #14034: added the argparse tutorial.
 
+Tools/Demos
+-----------
+
+- Issue #14965: Fix missing support for starred assignments in
+  Tools/parser/unparse.py.
+
 
 What's New in Python 3.2.3 release candidate 2?
 ===============================================

File Tools/parser/test_unparse.py

     def test_try_except_finally(self):
         self.check_roundtrip(try_except_finally)
 
+    def test_starred_assignment(self):
+        self.check_roundtrip("a, *b, c = seq")
+        self.check_roundtrip("a, (*b, c) = seq")
+        self.check_roundtrip("a, *b[0], c = seq")
+        self.check_roundtrip("a, *(b, c) = seq")
+
+
 class DirectoryTestCase(ASTTestCase):
     """Test roundtrip behaviour on all files in Lib and Lib/test."""
 

File Tools/parser/unparse.py

         self.dispatch(t.slice)
         self.write("]")
 
+    def _Starred(self, t):
+        self.write("*")
+        self.dispatch(t.value)
+
     # slice
     def _Ellipsis(self, t):
         self.write("...")