From b1f4d9ceaa94a6fe0b489d76d1826cde7d16cbb1 Mon Sep 17 00:00:00 2001 From: lagos Date: Fri, 2 Nov 2012 15:08:59 -0700 Subject: [PATCH] Adds a __ne__ operator to Command. This is necessary for CmdSet.remove() to behave as expected. --- src/commands/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands/command.py b/src/commands/command.py index 112ca5c5a0..487b404b1e 100644 --- a/src/commands/command.py +++ b/src/commands/command.py @@ -148,6 +148,10 @@ class Command(object): # probably got a string return cmd in self._matchset + def __ne__(self, cmd): + "The logical negation of __eq__." + return not self.__eq__(cmd) + def __contains__(self, query): """ This implements searches like 'if query in cmd'. It's a fuzzy matching