-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support py38-style starred expressions in return statement (#1121)
- Loading branch information
1 parent
7f5d0e9
commit be49ac7
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env python3.8 | ||
|
||
|
||
def starred_return(): | ||
my_list = ["value2", "value3"] | ||
return "value1", *my_list | ||
|
||
|
||
def starred_yield(): | ||
my_list = ["value2", "value3"] | ||
yield "value1", *my_list | ||
|
||
|
||
# output | ||
|
||
|
||
#!/usr/bin/env python3.8 | ||
|
||
|
||
def starred_return(): | ||
my_list = ["value2", "value3"] | ||
return "value1", *my_list | ||
|
||
|
||
def starred_yield(): | ||
my_list = ["value2", "value3"] | ||
yield "value1", *my_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters