(a, l, x)
Locate the rightmost value exactly equal to x
Locate the rightmost value exactly equal to x
Locate the rightmost value exactly equal to x
def _find_rteq(a, l, 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
    raise ValueError
def _find_rteq ( a , l , x ) : i = bisect_right ( a , x , lo = l ) if i != ( len ( a ) + 1 ) and a [ i - 1 ] == x : return i - 1 raise ValueError