A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-April/139549.html below:

[Python-Dev] PEP 492: No new syntax is required

[Python-Dev] PEP 492: No new syntax is requiredyoav glazner yoavglazner at gmail.com
Sun Apr 26 22:26:15 CEST 2015
How do you implement "async for"?

On Sun, Apr 26, 2015 at 11:21 PM, Mark Shannon <mark at hotpy.org> wrote:

> Hi,
>
> I was looking at PEP 492 and it seems to me that no new syntax is required.
>
> Looking at the code, it does four things; all of which, or a functional
> equivalent, could be done with no new syntax.
> 1. Make a normal function into a generator or coroutine. This can be done
> with a decorator.
> 2. Support a parallel set of special methods starting with 'a' or 'async'.
> Why not just use the current set of special methods?
> 3. "await". "await" is an operator that takes one argument and produces a
> single result, without altering flow control and can thus be replaced by an
> function.
> 4. Asynchronous with statement. The PEP lists the equivalent as "with
> (yield from xxx)" which doesn't seem so bad.
>
> Please don't add unnecessary new syntax.
>
> Cheers,
> Mark.
>
> P.S. I'm not objecting to any of the other new features proposed, just the
> new syntax.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/yoavglazner%40gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150426/596989a4/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4