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

Function ve2no

tests/sortedcollection.py:233–238  ·  view source on GitHub ↗

Convert ValueError result to -1

(f, *args)

Source from the content-addressed store, hash-verified

231if __name__ == '__main__':
232
233 def ve2no(f, *args):
234 'Convert ValueError result to -1'
235 try:
236 return f(*args)
237 except ValueError:
238 return -1
239
240 def slow_index(seq, k):
241 'Location of match or -1 if not found'

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected