Closed Nextraind closed 1 year ago
Python's quit
and exit
functions, which are equivalent in behavior, are oddly not documented as built-ins even though in Python3 they are both regular built-ins that terminate the current thread.
In Starlark we have the fail
function, which similarly generates an error in the current thread. (Perhaps it should have been named exit or quit.) The REPL doesn't terminate when it encounters the error from fail; perhaps it should.
Please re-open this issue if fail
is not suitable for your needs.
I want to quit the rest part of the script, and no throw any exceptions. fail()
works, but it throws error.
@adonovan Btw, I can't reopen it, since I'm not a colabrator of this repo. Got no such button ---
Just like Python itself