On Mon, Nov 4, 2019 at 11:01 AM Soni L. <fakedme...@gmail.com> wrote:
> 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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/27XJ4DVHZOCFBIFMFHYC2XYNEXSUXZ7N/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to