From: wim glenn Date: Tue, 14 May 2019 01:10:14 +0000 (-0500) Subject: Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296) X-Git-Tag: v3.8.0b1~377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a10a6b980dbddb59a054f273dbd97ea5e7ccda4;p=thirdparty%2FPython%2Fcpython.git Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296) --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 64de970fec94..e0469c208100 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`::