Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
-
endor56705y@SortOfTested honestly I have never used asyncio myself, but the whole reason I chose to go with curio (and the similarly inspired trio) was this article: https://vorpus.org/blog/...
It's quite a long read, but really well explained and detailed. Long story short, curio is just designed completely differently from the ground up, and (generally speaking) seems more intuitive and less error-prone because it just forces you to do things the right way from the start, instead of letting you mash everything together and shooting yourself in the foot.
trio seems to take this even further: it's quite opinionated, but going through the docs and issues it seems they've really mulled things over before making the design choices they've made.
Mind you, I only have a few days worth of experience with all this, so my perception could be way off. But judging by how quickly I'm picking this up, I say they must be doing something right -
endor56705yJust found out how to get the return value of an async function with curio:
foo = await curio.spawn(function, *args)
await foo.join()
bar = foo.result
Related Rants
Started learning python async with curio and trio just two days ago, and I must say I'm really having a blast.
I have a few pending ideas to combine it with websockets (also first time I'm learning how to use them).
Haven't had this much fun with python in a while!
Also, sidequestion: how can return a value from an async function with curio or trio? I can't find a proper answer or example about that, other than some hints about memory channels in trio
rant
python
async fun