Get the value for a given key. String keys will be hashed. key (str / int): The key to get. default: The default value to return. RETURNS: The value.
(self, key: Union[str, int], default: Optional[Any] = None)
| 107 | return OrderedDict.__getitem__(self, key) # type: ignore[index] |
| 108 | |
| 109 | def get(self, key: Union[str, int], default: Optional[Any] = None) -> Any: |
| 110 | """Get the value for a given key. String keys will be hashed. |
| 111 | |
| 112 | key (str / int): The key to get. |
| 113 | default: The default value to return. |
| 114 | RETURNS: The value. |
| 115 | """ |
| 116 | key = get_string_id(key) |
| 117 | return OrderedDict.get(self, key, default) # type: ignore[arg-type] |
| 118 | |
| 119 | def __contains__(self, key: Union[str, int]) -> bool: # type: ignore[override] |
| 120 | """Check whether a key is in the table. String keys will be hashed. |
no outgoing calls