    def __eq__(self, other):
        """
        Equals magic method.
        """
        if isinstance(other, ColouredText):
            return self.raw_text == other.raw_text
        return NotImplemented
Equals magic method.
asciimatics/strings.py