Repository navigation
Commit fc2943d
Sync binary-search with the updated tutorial (#943)
* Sync binary-search with the maintenance update of How to Do a Binary Search in Python
find_all_indices() tested the leftmost and rightmost indices for
truthiness, so a match at index 0 returned an empty set. Compare them
against None instead, matching the updated tutorial.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep download_imdb.py runnable on Python 3.7+
The tutorial and benchmark.py state a Python 3.7 floor, but the
parenthesized context managers in download_imdb.py need 3.9. Nested
with statements restore the stated floor (vermin: 3.7) without changing
behavior.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 5093d33 commit fc2943d
2 files changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments