pep 530: Mark as accepted; clarify awaits in "if" clause

This commit is contained in:
Yury Selivanov 2016-09-07 09:54:22 -07:00
parent af9b67843d
commit e40bf4d5cc
1 changed files with 21 additions and 1 deletions

View File

@ -4,7 +4,7 @@ Version: $Revision$
Last-Modified: $Date$
Author: Yury Selivanov <yury@magic.io>
Discussions-To: <python-dev@python.org>
Status: Draft
Status: Accepted
Type: Standards Track
Content-Type: text/x-rst
Created: 03-Sep-2016
@ -96,10 +96,18 @@ asynchronous and synchronous comprehensions::
result = {await fun() for fun in funcs}
result = {fun: await fun() for fun in funcs}
result = [await fun() for fun in funcs if await smth]
result = {await fun() for fun in funcs if await smth}
result = {fun: await fun() for fun in funcs if await smth}
result = [await fun() async for fun in funcs]
result = {await fun() async for fun in funcs}
result = {fun: await fun() async for fun in funcs}
result = [await fun() async for fun in funcs if await smth]
result = {await fun() async for fun in funcs if await smth}
result = {fun: await fun() async for fun in funcs if await smth}
This is only valid in ``async def`` function body.
@ -120,6 +128,18 @@ Backwards Compatibility
The proposal is fully backwards compatible.
Acceptance
==========
PEP 530 was accepted by Guido, September 6, 2016 [1]_.
References
==========
[1] https://mail.python.org/pipermail/python-ideas/2016-September/042141.html
Copyright
=========