Created
August 6, 2011 07:10
-
-
Save tcrayford/1129119 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
valid = some_method_to_set_valid() | |
status = error_message_from_valid_flag(valid) | |
def error_message_from_valid_flag(valid) | |
if valid == 1: | |
return "VALIDATED" | |
elif valid == 0: | |
return "INVALID" | |
elif valid == -1: | |
return "UNINITIALIZED_ERROR" | |
else: | |
return "UNKNOWN_ERROR" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment