MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / find_ge

Method find_ge

tests/sortedcollection.py:188–193  ·  view source on GitHub ↗

Return first item with a key >= equal to k. Raise ValueError if not found

(self, k)

Source from the content-addressed store, hash-verified

186 raise ValueError('No item found with key below: %r' % (k,))
187
188 def find_ge(self, k):
189 'Return first item with a key >= equal to k. Raise ValueError if not found'
190 i = bisect_left(self._keys, k)
191 if i != len(self):
192 return self._items[i]
193 raise ValueError('No item found with key at or above: %r' % (k,))
194
195 def find_gt(self, k):
196 'Return first item with a key > k. Raise ValueError if not found'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected