[Python-checkins] Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296)
Raymond Hettinger
webhook-mailer at python.org
Mon May 13 21:10:18 EDT 2019
https://github.com/python/cpython/commit/1a10a6b980dbddb59a054f273dbd97ea5e7ccda4
commit: 1a10a6b980dbddb59a054f273dbd97ea5e7ccda4
branch: master
author: wim glenn <wim.glenn at gmail.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2019-05-13T18:10:13-07:00
summary:
Simplify the ``LastUpdatedOrderedDict`` example recipe (GH-13296)
files:
M Doc/library/collections.rst
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`::
More information about the Python-checkins
mailing list