How to stop a running script inside a conditional statement?
Hello,
I have a sage script, say prg.sage inside which a conditional statement takes place. I would like the script to stop running if the condition is true after having called load("prg.sage") command, and still be in the sage environment. Pure python would allow me to use sys.exit()... What is the best way to do it the "sage way"?
If the condition is part of a function
def my_long_story():
then it is simplest toreturn
at the wanted point. The caller takes then care what happens after this. It it is not, then write it so.