Returns the value associated with a key. Parameters ---------- key : hashable object The key to be looked up. default : object Default value to return if the key is not present in the heap. Default value: None. Returns
(self, key, default=None)
| 65 | raise NotImplementedError |
| 66 | |
| 67 | def get(self, key, default=None): |
| 68 | """Returns the value associated with a key. |
| 69 | |
| 70 | Parameters |
| 71 | ---------- |
| 72 | key : hashable object |
| 73 | The key to be looked up. |
| 74 | |
| 75 | default : object |
| 76 | Default value to return if the key is not present in the heap. |
| 77 | Default value: None. |
| 78 | |
| 79 | Returns |
| 80 | ------- |
| 81 | value : object. |
| 82 | The value associated with the key. |
| 83 | """ |
| 84 | raise NotImplementedError |
| 85 | |
| 86 | def insert(self, key, value, allow_increase=False): |
| 87 | """Insert a new key-value pair or modify the value in an existing |
no outgoing calls