def __eq__(self, cmd):
        """
        Compare two command instances to each other by matching their
        key and aliases.

        Args:
            cmd (Command or str): Allows for equating both Command
                objects and their keys.

        Returns:
            equal (bool): If the commands are equal or not.

        """
        try:
            # first assume input is a command (the most common case)
            return self._matchset.intersection(cmd._matchset)
            #return cmd.key in self._matchset
        except __HOLE__:
            # probably got a string
            return cmd in self._matchset
dataset/ETHPy150Open evennia/evennia/evennia/commands/command.py/Command.__eq__