On Sun, Nov 3, 2019, at 11:01, Andrew Barnert via Python-ideas wrote:
counter-argument: foo = raise NIY
What is that a counter-argument to? The fact that it would nearly always be completely useless to assign a raise?
I don’t know what NIY means here, but why couldn’t you write this as `raise NIY`? Obviously nothing is getting assigned to `foo`.
As a side note, I have, occasionally, wanted to be able to resume a function after handling an exception (the use case was to turn a synchronous outer function calling an asynchronous callback into an asynchronous function), which - needless to say - is impossible in CPython. In a hypothetical implementation that would allow such a thing, having the raise return a value in such a scenario might not be unreasonable.