-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #574
base: master
Are you sure you want to change the base?
Solution #574
Conversation
app/main.py
Outdated
def validate(self, visitor: Visitor) -> bool: | ||
return (self.age.min_amount <= visitor.age <= self.age.max_amount | ||
and self.weight.min_amount <= visitor.weight | ||
<= self.weight.max_amount | ||
and self.height.min_amount <= visitor.height | ||
<= self.height.max_amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY
don't repeat yourself
app/main.py
Outdated
return (self.age.min_amount <= visitor.age <= self.age.max_amount | ||
and self.weight.min_amount <= visitor.weight | ||
<= self.weight.max_amount | ||
and self.height.min_amount <= visitor.height | ||
<= self.height.max_amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY
don't repeat yourself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
No description provided.