monty.bisect module — monty 4.0.2 documentation

# monty.bisect module

Additional bisect functions. Taken from https://docs.python.org/2/library/bisect.html The above bisect() functions are useful for finding insertion points but can be tricky or awkward to use for common searching tasks. The functions show how to transform them into the standard lookups for sorted lists.

`find_ge`(a, x)

  Find leftmost item greater than or equal to x.

`find_gt`(a, x)

  Find leftmost value greater than x.

`find_le`(a, x)

  Find rightmost value less than or equal to x.

`find_lt`(a, x)

  Find rightmost value less than x.

`index`(a, x, atol=None)

  Locate the leftmost value exactly equal to x.