Skip to content

Commit

Permalink
Simplify the LastUpdatedOrderedDict example recipe (pythonGH-13296)
Browse files Browse the repository at this point in the history
  • Loading branch information
wimglenn authored and rhettinger committed May 14, 2019
1 parent 45b2f88 commit 1a10a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`::
Expand Down

0 comments on commit 1a10a6b

Please sign in to comment.