From 325dc887caa15534309f4b7c419fadcd0bb1be7d Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 23 Mar 2013 06:34:19 -0700 Subject: Backport improved dict comparison logic --- Lib/collections/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 2dcc395..707c53b 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -228,8 +228,7 @@ class OrderedDict(dict): ''' if isinstance(other, OrderedDict): - return len(self)==len(other) and \ - all(map(_eq, self.items(), other.items())) + return dict.__eq__(self, other) and all(map(_eq, self, other)) return dict.__eq__(self, other) -- cgit v0.12