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

Function slow_index

tests/sortedcollection.py:240–245  ·  view source on GitHub ↗

Location of match or -1 if not found

(seq, k)

Source from the content-addressed store, hash-verified

238 return -1
239
240 def slow_index(seq, k):
241 'Location of match or -1 if not found'
242 for i, item in enumerate(seq):
243 if item == k:
244 return i
245 return -1
246
247 def slow_find(seq, k):
248 'First item with a key equal to k. -1 if not found'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected