Closed as not planned
Closed as not planned
Description
Feature or enhancement
Proposal:
I am making a class like collections.OrderedDict
, and I want to make it fully reversible. When the same class inherits collections.abc.Reversible
and collections.abc.Mapping
and implements required methods, keys can be iterated in reversed order, but not values and items.
When I try:
reversed(MyMapping)
it works
But
reversed(MyMapping.values())
reversed(MyMapping.items())
raises TypeError: 'ValuesView' object is not reversible
and TypeError: 'ItemsView' object is not reversible
.
Please make collections.abc.OrderedDict
's mixin methods (keys
, items
, values
) reversible when __reversed__
is implemented in the class.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response