[docs] [issue36909] LastUpdatedOrderedDict recipe uses super() unnecessarily

wim glenn report at bugs.python.org
Mon May 13 18:21:50 EDT 2019

New submission from wim glenn <wim.glenn at gmail.com>:

Section https://docs.python.org/3/library/collections.html#ordereddict-examples-and-recipes

    class LastUpdatedOrderedDict(OrderedDict):
        'Store items in the order the keys were last added'

        def __setitem__(self, key, value):
            super().__setitem__(key, value)

Why does it use super().move_to_end(key), isn't self.move_to_end(key) more direct/Pythonic?

assignee: docs at python
components: Documentation
messages: 342395
nosy: docs at python, rhettinger, wim.glenn
priority: normal
pull_requests: 13209
severity: normal
status: open
title: LastUpdatedOrderedDict recipe uses super() unnecessarily

Python tracker <report at bugs.python.org>

More information about the docs mailing list