4 Nov
2019
4 Nov
'19
12:26 a.m.
On Mon, Nov 4, 2019 at 11:01 AM Soni L.
In Rust, for example, one can do `let foo = unimplemented!();`. Ofc, one could also do:
def unimplemented(): raise NYI
but having the "raise" in the assignment makes it easier for a human to process - you can tell from "foo = raise NYI" that it's gonna raise an error, whereas "foo = unimplemented()" could return a placeholder value of some sort instead.
As long as you never assign to NYI, you can use it that way already. :) foo = NYI NameError: name 'NYI' is not defined ChrisA