From 767737265a639836f620d3d1d0d35140fc62e7dc Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 20 Jan 2019 19:35:49 +0000 Subject: [PATCH] issue #61: add inverse comparison (reported by LGTM) --- mitogen/parent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mitogen/parent.py b/mitogen/parent.py index fc7fedc1..23aa0cc9 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -1554,6 +1554,9 @@ class Context(mitogen.core.Context): super(Context, self).__init__(*args, **kwargs) self.default_call_chain = self.call_chain_class(self) + def __ne__(self, other): + return not (self == other) + def __eq__(self, other): return (isinstance(other, mitogen.core.Context) and (other.context_id == self.context_id) and