New submission from wim glenn <wim.gl...@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)
            super().move_to_end(key)

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

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

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36909>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to