-
-
Notifications
You must be signed in to change notification settings - Fork 44.3k
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
Add doctests to interpolation_search.py #11492
Add doctests to interpolation_search.py #11492
Conversation
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.
Line 11-12 please check it out
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.
value not in ("#", "")
. Use a set
if the elements are hashable.
but that file is not in my PR |
searches/interpolation_search.py
Outdated
>>> interpolation_search([1, 2, 3, 4, 5], 6) | ||
>>> interpolation_search([], 1) |
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.
>>> interpolation_search([1, 2, 3, 4, 5], 6) | |
>>> interpolation_search([], 1) | |
>>> interpolation_search([1, 2, 3, 4, 5], 6) is None | |
True | |
>>> interpolation_search([], 1) is None | |
True |
Please repeat below.
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.
fixed
|
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.
Looks good to be @cclauss will let know better to move forward with this.
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.
Thanks!
Describe your change:
Contributes to #9943
Checklist: