2 ms·
Huge +1 to this. Looking at python 3.13 release notes [1]: > asyncio.as_completed() now returns an object that is both an asynchronous iterator and a plain ite
by aylmao 2y ago
Huge +1 to this. Looking at python 3.13 release notes [1]:
> asyncio.as_completed() now returns an object that is both an asynchronous iterator and a plain iterator of awaitables. The awaitables yielded by asynchronous iteration include original task or future objects that were passed in, making it easier to associate results with the tasks being completed. (Contributed by Justin Arthur in gh-77714.)
"I’m pretty sure it’s a cool feature but, what a mouthful. Imagine you decided to start developing python scripts today, how do you even start?"
[1] https://docs.python.org/3/whatsnew/3.13.html#asyncio https://docs.python.org/3/whatsnew/3.13.html#asyncio
- kovrik 2y agoNot sure if those are the same though? Async, await, iterators, futures etc. are pretty much standard constructs in almost all programming languages / concurrency frameworks. Whereas Actions, Transitions, Pending State, Reducers etc. are React-specific idiosyncrasies. I guess that's the main issue people have with React, when you learn it you have to spend so much time to learn all these React-specific constructs and idiosyncrasies that are not transferable anywhere else.
- aylmao 2y agoWhen one is learning to program, one doesn't jump straight into learning coroutine management. Similarly, wether they are React-specific idiosyncrasies or not, one shouldn't assume people need to jump straight into Actions, Transitions, etc when first learning React.