From f675afa13ce89ea25a9798b2f7a57b091bb83dfa Mon Sep 17 00:00:00 2001 From: darkryder Date: Thu, 9 Jul 2015 23:30:36 +0530 Subject: Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__() --- django/utils/datastructures.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/utils') 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 -- cgit v1.3