Skip to content

bpo-34508: allow unparenthesized star-unpacking expressions in return statements #8942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update documentation.
  • Loading branch information
mdickinson committed Aug 26, 2018
commit 19d3683f328abb911b162c92bc174e06caeed0c3
4 changes: 2 additions & 2 deletions Doc/reference/simple_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,12 @@ The :keyword:`return` statement
pair: class; definition

.. productionlist::
return_stmt: "return" [`expression_list`]
return_stmt: "return" [`starred_expression`]

:keyword:`return` may only occur syntactically nested in a function definition,
not within a nested class definition.

If an expression list is present, it is evaluated, else ``None`` is substituted.
If an expression is present, it is evaluated, else ``None`` is substituted.

:keyword:`return` leaves the current function call with the expression list (or
``None``) as return value.
Expand Down