You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yup, I agree with my past self that raise SystemExit saves you from import sys. A few notes:
Both exit(1) and raise SystemExit(1) are valid syntax.
There is a small goodie in exit: "exit("Here is why the program failed"), which prints the error message and exits with return status 1." (via Jasha at mentioned SO answer).
[best-practices-programming] python: quit() vs sys.exit(1)
Just putting here to document. Not a serious issue, just in the light of roboticslab-uc3m/yarp-devices@3c1f7f3 where both were being used. Could not find similar issue in https://github.com/roboticslab-uc3m/questions-and-answers.
The text was updated successfully, but these errors were encountered: