Skip to content

Commit

Permalink
len(prev) == n
Browse files Browse the repository at this point in the history
  • Loading branch information
groutr committed Jun 5, 2018
1 parent 90ea648 commit c323698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolz/itertoolz.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def partition_all(n, seq):
# https://github.com/pytoolz/toolz/issues/387
# We can employ modified binary search here to speed things up from O(n) to O(log n)
# Binary search from CPython's bisect module, modified for identity testing.
lo, hi = 0, len(prev)
lo, hi = 0, n
while lo < hi:
mid = (lo + hi) // 2
if prev[mid] is no_pad:
Expand Down

0 comments on commit c323698

Please sign in to comment.