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

Function slow_find_lt

tests/sortedcollection.py:261–266  ·  view source on GitHub ↗

Last item with a key less-than k.

(seq, k)

Source from the content-addressed store, hash-verified

259 return -1
260
261 def slow_find_lt(seq, k):
262 'Last item with a key less-than k.'
263 for item in reversed(seq):
264 if item < k:
265 return item
266 return -1
267
268 def slow_find_ge(seq, k):
269 'First item with a key-value greater-than or equal to k.'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected