MCPcopy Create free account
hub / github.com/Eve-PySpy/PySpy / Get

Method Get

optstore.py:46–59  ·  view source on GitHub ↗

Returns the value of the specified key in the dictionary object. :param `key`: a valid key of the dictionary object; :param `default`: the value that should be returned if key is invalid;

(self, key, default=None)

Source from the content-addressed store, hash-verified

44 return keys
45
46 def Get(self, key, default=None):
47 '''
48 Returns the value of the specified key in the dictionary object.
49
50 :param `key`: a valid key of the dictionary object;
51 :param `default`: the value that should be returned if key is invalid;
52 '''
53 try:
54 return self._options[key]
55 except KeyError:
56 if default is not None:
57 return default
58 else:
59 raise Exception("ERROR: no such key: " + str(key))
60
61 def Set(self, key, value):
62 '''

Callers 15

chk_github_updateFunction · 0.80
config.pyFile · 0.80
prepare_ship_dataFunction · 0.80
__init__Method · 0.80
__set_propertiesMethod · 0.80
OnApplyMethod · 0.80
OnCancelMethod · 0.80
__init__Method · 0.80
__set_propertiesMethod · 0.80
_fontScaleMenuMethod · 0.80
_toggleColumnMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected