-
-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Add doctests to interpolation_search.py #11492
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
Conversation
Abonimohan
left a comment
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
imSanko
left a comment
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
|
|
imSanko
left a comment
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.
cclauss
left a comment
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!
* Add doctests to interpolation_search.py * update docs * update tests * update tests 2 * clean code
* Add doctests to interpolation_search.py * update docs * update tests * update tests 2 * clean code
Describe your change:
Contributes to #9943
Checklist: