diff options
author | Diego Lima <diego.lima@lais.huol.ufrn.br> | 2021-03-06 17:41:24 -0300 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-08 08:22:07 +0100 |
commit | 2e5aa444d140a9f2bc858e493ff85ced589f1a58 (patch) | |
tree | 94d15ebf564a8a58123dbdda3c7727af0305e923 /django/utils/datastructures.py | |
parent | d01709aae21de9cd2565b9c52f32732ea28a2d98 (diff) | |
download | django-2e5aa444d140a9f2bc858e493ff85ced589f1a58.tar.gz |
Fixed #32517 -- Made OrderedSet reversible.
Refs #32516.
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r-- | django/utils/datastructures.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 871b016715..99f9ff2a72 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -25,6 +25,9 @@ class OrderedSet: def __iter__(self): return iter(self.dict) + def __reversed__(self): + return reversed(self.dict) + def __contains__(self, item): return item in self.dict |