fix from code review regarding py2py3 compat

This commit is contained in:
Bastien Gérard
2019-07-19 21:50:47 +02:00
parent 82af5e4a19
commit 64c0cace85
3 changed files with 10 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
import weakref
from bson import DBRef
from future.utils import listitems
import six
from six import iteritems
@@ -422,10 +423,10 @@ class StrictDict(object):
return len(list(iteritems(self)))
def __eq__(self, other):
return list(self.items()) == list(other.items())
return listitems(self) == listitems(other)
def __ne__(self, other):
return list(self.items()) != list(other.items())
return not(self == other)
@classmethod
def create(cls, allowed_keys):