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

Function slow_find

tests/sortedcollection.py:247–252  ·  view source on GitHub ↗

First item with a key equal to k. -1 if not found

(seq, k)

Source from the content-addressed store, hash-verified

245 return -1
246
247 def slow_find(seq, k):
248 'First item with a key equal to k. -1 if not found'
249 for item in seq:
250 if item == k:
251 return item
252 return -1
253
254 def slow_find_le(seq, k):
255 'Last item with a key less-than or equal to k.'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected