Last active
January 19, 2020 23:05
-
-
Save jdevera/2f97ac9e0706b4ee4224c1c8ae3b60c6 to your computer and use it in GitHub Desktop.
My most rewritten function: die
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def die(*messages, rc=1): | |
""" | |
Print the arguments in stderr and exit with a given return code | |
""" | |
print(*messages, file=sys.stderr) | |
sys.exit(rc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment