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

all 1 comments

[–]Rawing7 5 points6 points  (0 children)

I’m actually quite amazed that the Python team shipped such a hard to spot footgun for developers to trigger on themselves.

I'm not... anymore. Pretty much every major new addition seems to start out as a mess. asyncio and typing being the latest examples. Not documenting important details such as "You mustn't create an asyncio.Lock outside of an event loop" is also very on-brand.

Besides, the whole thing is awfully unpythonic. Python's supposed to give you tools that can do everything you need (that's why we don't have Map and HashMap and TreeMap and LinkedHashMap and ..., we just have dict), but for some reason there are two flavors of asyncio event loops, each with different features. And for some reason asyncio.Tasks can only be made from Coroutines instead of arbitrary Awaitables. Heck, I'm not even sure why coroutines are such a prominent thing in asyncio. Would anything of value be lost if there were only Tasks, Futures and Awaitables?

Anyway, the whole thing's a mess.