Movatterモバイル変換


[0]ホーム

URL:


[Python-ideas] Delayed Execution via Keyword

Mark E. Haasemehaase at gmail.com
Fri Feb 17 14:39:59 EST 2017


On Fri, Feb 17, 2017 at 1:55 PM, Joshua Morton <joshua.morton13 at gmail.com>wrote:> but I'm wondering how common async and await were when that was proposed> and accepted?Actually, "async" and "await" are backwards compatible due to a clevertokenizer hack. The "async" keyword may only appear in a few places (e.g.async def), and it is treated as a name anywhere else.The "await" keywordmay only appear inside an "async def" and is treated as a name everywhereelse. Therefore...    >>> async = 1    >>> await = 1...these are both valid in Python 3.5. This example is helpful whenproposing new keywords.More info:https://www.python.org/dev/peps/pep-0492/#transition-plan-------------- next part --------------An HTML attachment was scrubbed...URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170217/947186b8/attachment.html>


More information about the Python-ideasmailing list

[8]ページ先頭

©2009-2026 Movatter.jp