Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1b2e9444
Commit
1b2e9444
authored
May 06, 2012
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14965: Fix missing support for starred assignments in Tools/parser/unparse.py.
parent
9ab3fdd8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
Misc/NEWS
Misc/NEWS
+6
-0
Tools/parser/test_unparse.py
Tools/parser/test_unparse.py
+7
-0
Tools/parser/unparse.py
Tools/parser/unparse.py
+4
-0
No files found.
Misc/NEWS
View file @
1b2e9444
...
...
@@ -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?
===============================================
...
...
Tools/parser/test_unparse.py
View file @
1b2e9444
...
...
@@ -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."""
...
...
Tools/parser/unparse.py
View file @
1b2e9444
...
...
@@ -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
(
"..."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment