>>> cache = LFUCache(1) >>> 1 in cache False >>> cache.put(1, 1) >>> 1 in cache True
(self, key: T)
| 216 | ) |
| 217 | |
| 218 | def __contains__(self, key: T) -> bool: |
| 219 | """ |
| 220 | >>> cache = LFUCache(1) |
| 221 | |
| 222 | >>> 1 in cache |
| 223 | False |
| 224 | |
| 225 | >>> cache.put(1, 1) |
| 226 | >>> 1 in cache |
| 227 | True |
| 228 | """ |
| 229 | |
| 230 | return key in self.cache |
| 231 | |
| 232 | def get(self, key: T) -> U | None: |
| 233 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected