Skip to content

Instantly share code, notes, and snippets.

@sergiors
Created July 23, 2021 14:11
Show Gist options
  • Save sergiors/437b6e376e90bc7c10ee3ae8ce376ea7 to your computer and use it in GitHub Desktop.
Save sergiors/437b6e376e90bc7c10ee3ae8ce376ea7 to your computer and use it in GitHub Desktop.
def should_i_wear_this_hat(self, hat):
if not isinstance(hat, Hat):
return False
current_fashion = get_fashion()
weather_outside = self.look_out_of_window()
is_stylish = self.evaluate_style(hat, current_fashion)
if weather_outside.is_raining:
print("Damn.")
return True
print("Great.")
return is_stylish
def should_i_wear_this_hat(self, hat):
if not isinstance(hat, Hat):
return False
weather_outside = self.look_out_of_window()
if weather_outside.is_raining:
print("Damn.")
return True
print("Great.")
current_fashion = get_fashion()
return self.evaluate_style(hat, current_fashion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment