summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authordarkryder <sambhav13085@iiitd.ac.in>2015-07-09 23:30:36 +0530
committerTim Graham <timograham@gmail.com>2015-07-09 21:20:52 -0400
commitf675afa13ce89ea25a9798b2f7a57b091bb83dfa (patch)
tree808eb3e261cf5abd798d2b07cf11aef0595ad2cb /django/utils/datastructures.py
parent11e6bf9bdfaecd5325686599af5b21b5b945e61c (diff)
Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__()
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 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