Skip to content

Instantly share code, notes, and snippets.

@edgabaldi
Created December 6, 2016 16:26
Show Gist options
  • Save edgabaldi/621d6200285fc175b3135c905a251e39 to your computer and use it in GitHub Desktop.
Save edgabaldi/621d6200285fc175b3135c905a251e39 to your computer and use it in GitHub Desktop.
python is so cool
"""
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