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

Function slow_find_gt

tests/sortedcollection.py:275–280  ·  view source on GitHub ↗

First item with a key-value greater-than or equal to k.

(seq, k)

Source from the content-addressed store, hash-verified

273 return -1
274
275 def slow_find_gt(seq, k):
276 'First item with a key-value greater-than or equal to k.'
277 for item in seq:
278 if item > k:
279 return item
280 return -1
281
282 from random import choice
283 pool = [1.5, 2, 2.0, 3, 3.0, 3.5, 4, 4.0, 4.5]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected