#32517: Allow calling reversed() on an OrderedSet
-------------------------------------+-------------------------------------
Reporter: Chris | Owner: nobody
Jerdonek |
Type: New | Status: new
feature |
Component: Core | Version: 4.0
(Other) |
Severity: Normal | Keywords: OrderedSet,reversed
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently,
[https://github.com/django/django/blob/286fb73b6962d197ed0cf041755fb724cfe08600/django/utils/datastructures.py#L5
OrderedSet] isn't reversible (i.e. allowed to be passed as an argument to
Python's [https://docs.python.org/3/library/functions.html#reversed
reversed()]). This would be natural to support given that `OrderedSet` is
ordered. This should be straightforward to add by adding a
`__reversed__()` method to `OrderedSet`.
--
Ticket URL: <https://code.djangoproject.com/ticket/32517>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.91eea0de090adc085c63ea1d680c7d1a%40djangoproject.com.