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

Method lastOption

funct/Array.py:898–903  ·  view source on GitHub ↗

Selects the last element of this Array if it has one, otherwise returns default.

(self, default=None)

Source from the content-addressed store, hash-verified

896 return self[-1]
897
898 def lastOption(self, default=None):
899 """
900 Selects the last element of this Array if it has one,
901 otherwise returns default.
902 """
903 return self.get(-1, default)
904
905 @property
906 def init(self):

Callers 1

testMethod · 0.95

Calls 1

getMethod · 0.95

Tested by 1

testMethod · 0.76