[util] let a CustomNone instance be equal to itself

This commit is contained in:
Mike Fährmann
2024-07-26 20:56:01 +02:00
parent 8ecd408f53
commit d7a2c73274
2 changed files with 9 additions and 4 deletions

View File

@@ -540,10 +540,14 @@ class CustomNone():
def __bool__():
return False
def __eq__(self, other):
return self is other
def __ne__(self, other):
return self is not other
__lt__ = true
__le__ = true
__eq__ = false
__ne__ = true
__gt__ = false
__ge__ = false