<div dir="ltr">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).<div><br></div><div>As I said, I'm pretty new to Asyncio and thus may be missing some immportant feature of the lib (which is apparently the case here).</div></div><br><div class="gmail_quote"><div dir="ltr">Le lun. 20 août 2018 à 09:29, Nathaniel Smith <<a href="mailto:njs@pobox.com">njs@pobox.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Aug 20, 2018 at 12:19 AM, Simon De Greve <<a href="mailto:degrevesim@gmail.com" target="_blank">degrevesim@gmail.com</a>> wrote:<br>
> Hello everyone,<br>
><br>
> I'm quite new working with asyncio and thus maybe missing some things about<br>
> it, but wouldn't it be quite easier to have some iterables to support async<br>
> for loops "natively", since asyncio is now part of the Stdlib?<br>
><br>
> I've tried to work with asyncio while using discord.py, and has some<br>
> struggle with an "async for" loop on a dictionary, so I had to implement a<br>
> new dict subclass that would just reimplement items(), keys() and values()<br>
> functions.<br>
><br>
> I think that it would be a cool improvement to implement some of those in<br>
> some standard way. There's some code I wrote on a CodeReview thread but I<br>
> still haven't got any feedback on it.<br>
><br>
> Here's the link of the thread :<br>
> <a href="https://codereview.stackexchange.com/questions/197551/asynchronous-dictionary-in-python" rel="noreferrer" target="_blank">https://codereview.stackexchange.com/questions/197551/asynchronous-dictionary-in-python</a><br>
<br>
You can do this, but I don't see what it accomplishes...<br>
<br>
Are you aware that you can use regular 'for' loops inside 'async def' functions?<br>
<br>
-n<br>
<br>
-- <br>
Nathaniel J. Smith -- <a href="https://vorpus.org" rel="noreferrer" target="_blank">https://vorpus.org</a><br>
</blockquote></div>