-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
PEP 654 was recently added to CPython 3.11. It adds exceptions propagated together and a new except* syntax to handle them. Tracebacks handle this as well. This was considered a prerequisite to adding TaskGroup to asyncio, and delayed TaskGroup for about three years.
I am very fond of TaskGroup, and think it makes asyncio a lot easier to use. I think it will also be the style going forward, though it will take a while to catch on.
@dpgeorge and @jimmo, have you thought about when or if you might add TaskGroup, and whether you would add it compatibly (implementing PEP 654)? 654 seems pretty complicated and might add a lot of code, but I haven't looked at it in detail. Or might you add TaskGroup but not make it quite compatible?
BTW, the person who did async/await for CircuitPython added __await__. I think you are still using __iter__, but I wonder about whether you feel the need to add __await__ as well.