MCPcopy
hub / github.com/keystone-engine/keypatch / get_value_by_idx

Method get_value_by_idx

keypatch.py:835–843  ·  view source on GitHub ↗
(self, dictionary, idx, default=None)

Source from the content-addressed store, hash-verified

833 return (keys, values)
834
835 def get_value_by_idx(self, dictionary, idx, default=None):
836 (keys, values) = self.dict_to_ordered_list(dictionary)
837
838 try:
839 val = values[idx]
840 except IndexError:
841 val = default
842
843 return val
844
845 def find_idx_by_value(self, dictionary, value, default=None):
846 (keys, values) = self.dict_to_ordered_list(dictionary)

Callers 2

get_arch_by_idxMethod · 0.95
get_syntax_by_idxMethod · 0.95

Calls 1

dict_to_ordered_listMethod · 0.95

Tested by

no test coverage detected