MCPcopy Create free account
hub / github.com/Lauriat/funct / get

Method get

funct/Array.py:483–491  ·  view source on GitHub ↗

Safe method for getting elements in the Array. Returns default if the index does not exist.

(self, key, default=None)

Source from the content-addressed store, hash-verified

481 return self
482
483 def get(self, key, default=None):
484 """
485 Safe method for getting elements in the Array.
486 Returns default if the index does not exist.
487 """
488 try:
489 return self[key]
490 except IndexError:
491 return default
492
493 def map(self, l, inplace=False):
494 """

Callers 4

headOptionMethod · 0.95
lastOptionMethod · 0.95
testMethod · 0.95
test_errsMethod · 0.80

Calls

no outgoing calls

Tested by 2

testMethod · 0.76
test_errsMethod · 0.64