summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index ad17573104..d94a05dfb4 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -160,6 +160,9 @@ class SortedDict(dict):
def __iter__(self):
return iter(self.keyOrder)
+ def __reversed__(self):
+ return reversed(self.keyOrder)
+
def pop(self, k, *args):
result = super(SortedDict, self).pop(k, *args)
try: