8000 bpo-40331: Increase test coverage for the statistics module by tzabal · Pull Request #19608 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40331: Increase test coverage for the statistics module #19608

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

Merged
merged 10 commits into from
May 13, 2020
Prev Previous commit
Next Next commit
Revert cosmetic change in docstring
  • Loading branch information
tzabal committed Apr 19, 2020
commit 49def61e93e0468e35afc104ed36ad262818f4d5
4 changes: 2 additions & 2 deletions Lib/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ def _convert(value, T):


def _find_lteq(a, x):
"""Locate the leftmost value exactly equal to x"""
'Locate the leftmost value exactly equal to x'
i = bisect_left(a, x)
if i != len(a) and a[i] == x:
return i
raise ValueError


def _find_rteq(a, l, x):
"""Locate the rightmost value exactly equal to x"""
'Locate the rightmost value exactly equal to x'
i = bisect_right(a, x, lo=l)
if i != (len(a)+1) and a[i-1] == x:
return i-1
Expand Down
0