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)
| 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 | ''' |
no outgoing calls
no test coverage detected