Return a shallow copy of the instance.
(self)
| 465 | return (self.capacity,) |
| 466 | |
| 467 | def copy(self) -> "te.Self": |
| 468 | """Return a shallow copy of the instance.""" |
| 469 | rv = self.__class__(self.capacity) |
| 470 | rv._mapping.update(self._mapping) |
| 471 | rv._queue.extend(self._queue) |
| 472 | return rv |
| 473 | |
| 474 | def get(self, key: t.Any, default: t.Any = None) -> t.Any: |
| 475 | """Return an item from the cache dict or `default`""" |