Kaydet (Commit) 1b2e9444 authored tarafından Mark Dickinson's avatar Mark Dickinson

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

üst 9ab3fdd8
......@@ -225,6 +225,12 @@ Documentation
- 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?
===============================================
......
......@@ -209,6 +209,13 @@ class UnparseTestCase(ASTTestCase):
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."""
......
......@@ -472,6 +472,10 @@ class Unparser:
self.dispatch(t.slice)
self.write("]")
def _Starred(self, t):
self.write("*")
self.dispatch(t.value)
# slice
def _Ellipsis(self, t):
self.write("...")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment