summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-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 6c60675d38..76f7459032 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -37,6 +37,9 @@ class OrderedSet(object):
def __nonzero__(self): # Python 2 compatibility
return type(self).__bool__(self)
+ def __len__(self):
+ return len(self.dict)
+
class MultiValueDictKeyError(KeyError):
pass