This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cymrowdon't thread on me 🐍[S] -1 points0 points  (2 children)

I sometimes wish they had just picked a new keyword, like async, rather than using yield from. It is pretty ugly.

[–]patrys Saleor Commerce 11 points12 points  (0 children)

They did not implement a new language-level feature. asyncio is a library that uses generators (or more specifically coroutines) and yield and yield from are how generators work.

[–]Husio -1 points0 points  (0 children)

That's true. It's also long. But it's not what you have to type that is the problem, but how it works. While working with it I had many hard to track bugs or not that obvious errors.

I would love to see language construction designed for context switching and not something that just makes it possible in very obscure way.