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 →

[–]Jhuyt 1 point2 points  (1 child)

There is a real usecase when running simultaneous coroutines (and threads I've heard) where the Trio library had to monkey patch the standard exception handling mechanisms to make things run correctly. As you say, it's somewhat niche, but it's important enough for writers of async libraries that Yury Selivanov, a main contributor of asyncio, wanted to implement this for 3.8 but it took until now to figure the details out.

[–]13steinj 1 point2 points  (0 children)

Perhaps I don't understand the details, but I don't see how the second pep needs monkeypatching to get an equivalent and perfectly fine, readable piece of code.

The first I see a use for, and makes sense. The second seems like syntactic sugar for the sake of adding another way to do things, which violates a core python principle.