mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Simplify the `LastUpdatedOrderedDict
` example recipe (GH-13296)
This commit is contained in:
parent
45b2f8893c
commit
1a10a6b980
1 changed files with 1 additions and 1 deletions
|
@ -1141,7 +1141,7 @@ original insertion position is changed and moved to the end::
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
super().__setitem__(key, value)
|
super().__setitem__(key, value)
|
||||||
super().move_to_end(key)
|
self.move_to_end(key)
|
||||||
|
|
||||||
An :class:`OrderedDict` would also be useful for implementing
|
An :class:`OrderedDict` would also be useful for implementing
|
||||||
variants of :func:`functools.lru_cache`::
|
variants of :func:`functools.lru_cache`::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue