mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 09:46:32 +01:00
Adds a __ne__ operator to Command. This is necessary for CmdSet.remove() to behave as expected.
This commit is contained in:
parent
92f6b06626
commit
b1f4d9ceaa
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue