From 79df8d799a5335eb2d55425ed4cc330bb58f1c86 Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Thu, 19 Jun 2014 14:10:24 -0400 Subject: [PATCH] Revert "PYTHON-710, simplify SON's equality operator." This reverts commit 551e1e3edff029ffb1ad5e789b662a050ddf3a49. The change did not work as expected in Jython. --- bson/son.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bson/son.py b/bson/son.py index 18ec88c62..c233f7843 100644 --- a/bson/son.py +++ b/bson/son.py @@ -208,7 +208,7 @@ class SON(dict): """ if isinstance(other, SON): return len(self) == len(other) and self.items() == other.items() - return dict.__eq__(self, other) + return self.to_dict() == other def __ne__(self, other): return not self == other