>>> cache = LRUCache(1) >>> 1 in cache False >>> cache.put(1, 1) >>> 1 in cache True
(self, key: T)
| 229 | ) |
| 230 | |
| 231 | def __contains__(self, key: T) -> bool: |
| 232 | """ |
| 233 | >>> cache = LRUCache(1) |
| 234 | |
| 235 | >>> 1 in cache |
| 236 | False |
| 237 | |
| 238 | >>> cache.put(1, 1) |
| 239 | |
| 240 | >>> 1 in cache |
| 241 | True |
| 242 | """ |
| 243 | |
| 244 | return key in self.cache |
| 245 | |
| 246 | def get(self, key: T) -> U | None: |
| 247 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected