Add shortcut to context comparison
This commit is contained in:
parent
5fff9d2ce8
commit
371f8488df
@ -128,6 +128,8 @@ class IRCContext:
|
||||
|
||||
def _compare(self, other, cls, *attributes):
|
||||
"""Compare two instances and return a proper value."""
|
||||
if self is other:
|
||||
return True
|
||||
if not isinstance(other, cls):
|
||||
return NotImplemented
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user