Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Terry Reedy
On 8/20/2018 3:19 AM, Simon De Greve wrote: Hello everyone, I'm quite new working with asyncio and thus maybe missing some things about it, but wouldn't it be quite easier to have some iterables to support async for loops "natively", since asyncio is now part of the Stdlib? One purpose of a

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Simon De Greve
Ok, as I thought I was missing something quite important in the process. Thanks to everybody in here. Le lun. 20 août 2018 à 15:53, Joao S. O. Bueno a écrit : > On Mon, 20 Aug 2018 at 04:49, Chris Angelico wrote: > > > > On Mon, Aug 20, 2018 at 5:34 PM, Simon De Greve > wrote: > > > Do you me

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Joao S. O. Bueno
On Mon, 20 Aug 2018 at 04:49, Chris Angelico wrote: > > On Mon, Aug 20, 2018 at 5:34 PM, Simon De Greve wrote: > > Do you mean that for loops inside an "async def" statements are always > > executed as 'async for' loops? That's what I wanted to acheive by writing > > the AsyncDict class (c.f. the

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Chris Angelico
On Mon, Aug 20, 2018 at 5:34 PM, Simon De Greve wrote: > Do you mean that for loops inside an "async def" statements are always > executed as 'async for' loops? That's what I wanted to acheive by writing > the AsyncDict class (c.f. the CodeReview link). The point of an 'async for' loop is that gr

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Nathaniel Smith
On Mon, Aug 20, 2018 at 12:34 AM, Simon De Greve wrote: > Do you mean that for loops inside an "async def" statements are always > executed as 'async for' loops? That's what I wanted to acheive by writing > the AsyncDict class (c.f. the CodeReview link). The only difference between an 'async for'

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Simon De Greve
Do you mean that for loops inside an "async def" statements are always executed as 'async for' loops? That's what I wanted to acheive by writing the AsyncDict class (c.f. the CodeReview link). As I said, I'm pretty new to Asyncio and thus may be missing some immportant feature of the lib (which is

Re: [Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Nathaniel Smith
On Mon, Aug 20, 2018 at 12:19 AM, Simon De Greve wrote: > Hello everyone, > > I'm quite new working with asyncio and thus maybe missing some things about > it, but wouldn't it be quite easier to have some iterables to support async > for loops "natively", since asyncio is now part of the Stdlib? >

[Python-ideas] Asynchronous friendly iterables

2018-08-20 Thread Simon De Greve
Hello everyone, I'm quite new working with asyncio and thus maybe missing some things about it, but wouldn't it be quite easier to have some iterables to support async for loops "natively", since asyncio is now part of the Stdlib? I've tried to work with asyncio while using discord.py, and has so