[Python-ideas] Are there asynchronous generators?
p.f.moore at gmail.com
Mon Jun 29 12:57:58 CEST 2015
On 29 June 2015 at 09:32, Nick Coghlan <ncoghlan at gmail.com> wrote:
> What we *don't* have are consumption functions that have an implied
> "async for" inside them - functions like sum(), any(), all(), etc are
> all synchronous drivers.
Note that this requirement to duplicate big chunks of functionality in
sync and async forms is a fundamental aspect of the design. It's not
easy to swallow (hence the fact that threads like this keep coming up)
as it seems to badly violate DRY principles, but it is deliberate.
There are a number of blog posts that discuss this "two separate
worlds" approach, some positive, some negative. Links have been posted
recently in one of these threads, but I'm afraid I don't have them to
hand right now.
More information about the Python-ideas