Created
December 6, 2016 16:26
-
-
Save edgabaldi/621d6200285fc175b3135c905a251e39 to your computer and use it in GitHub Desktop.
python is so cool
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
""" | |
Before | |
""" | |
def something(self, is_closed, is_out_of_time): | |
if is_closed: | |
return True | |
if not is_closed and is_out_of_time: | |
return True | |
return False | |
""" | |
After | |
"""" | |
def something(self, is_closed, is_out_of_time): | |
return is_closed or is_out_of_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment