Add __ne__ method to bson/objectid.py
This commit is contained in:
parent
3cb007ee2d
commit
80e59ddd15
@ -235,6 +235,11 @@ class ObjectId(object):
|
||||
return self.__id == other.__id
|
||||
return NotImplemented
|
||||
|
||||
def __ne__(self,other):
|
||||
if isinstance(other, ObjectId):
|
||||
return self.__id != other.__id
|
||||
return NotImplemented
|
||||
|
||||
def __lt__(self, other):
|
||||
if isinstance(other, ObjectId):
|
||||
return self.__id < other.__id
|
||||
|
||||
Loading…
Reference in New Issue
Block a user