Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanschnell committed May 8, 2021
1 parent 9b4dcfc commit 182b479
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bitarray/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,7 @@ def count_n(a, n):
"return lowest index i for which a[:i].count() == n"
i, j = n, a.count(1, 0, n)
while j < n:
if a[i]:
j += 1
j += a[i]
i += 1
return i

Expand Down

0 comments on commit 182b479

Please sign in to comment.