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/139603.html below:

[Python-Dev] PEP 492: async/await in Python; v3

[Python-Dev] PEP 492: async/await in Python; v3 [Python-Dev] PEP 492: async/await in Python; v3Greg greg.ewing at canterbury.ac.nz
Wed Apr 29 05:59:15 CEST 2015
On 29/04/2015 9:49 a.m., Guido van Rossum wrote:
>     c) 'yield from' only accept coroutine objects from
>     generators decorated with 'types.coroutine'. That means
>     that existing asyncio generator-based coroutines will
>     happily yield from both coroutines and generators.
>     *But* every generator-based coroutine *must* be
>     decorated with `asyncio.coroutine()`.  This is
>     potentially a backwards incompatible change.
>
> See below. I worry about backward compatibility. A lot. Are you saying
> that asycio-based code that doesn't use @coroutine will break in 3.5?

That seems unavoidable if the goal is for 'await' to only
work on generators that are intended to implement coroutines,
and not on generators that are intended to implement
iterators. Because there's no way to tell them apart
without marking them in some way.

-- 
Greg

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