From 1a10a6b980dbddb59a054f273dbd97ea5e7ccda4 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Mon, 13 May 2019 20:10:14 -0500 Subject: Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296) --- Doc/library/collections.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 64de970..e0469c2 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -1141,7 +1141,7 @@ original insertion position is changed and moved to the end:: def __setitem__(self, 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 variants of :func:`functools.lru_cache`:: -- cgit v0.12