[New-bugs-announce] [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)
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 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>
<https://bugs.python.org/issue36909>
_______________________________________
More information about the New-bugs-announce
mailing list