(self, nslots: int)
| 349 | |
| 350 | class _DictCache(dict): |
| 351 | def __init__(self, nslots: int) -> None: |
| 352 | if nslots < 1: |
| 353 | raise ValueError("Invalid number of slots: %d" % nslots) |
| 354 | self.nslots = nslots |
| 355 | super().__init__() |
| 356 | |
| 357 | def __setitem__(self, key: Any, value: Any) -> None: |
| 358 | # Check if we are running out of space |