def __eq__(self, other):
if isinstance(other, ConfusionTable):<EOL><INDENT>if id(self) == id(other):<EOL><INDENT>return True<EOL><DEDENT>if (<EOL>self._tp == other.true_pos()<EOL>and self._tn == other.true_neg()<EOL>and self._fp == other.false_pos()<EOL>and self._fn == other.false_neg()<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>elif isinstance(other, (tuple, list)):<EOL><INDENT>if (<EOL>self._tp == other[<NUM_LIT:0>]<EOL>and self._tn == other[<NUM_LIT:1>]<EOL>and self._fp == other[<NUM_LIT:2>]<EOL>and self._fn == other[<NUM_LIT:3>]<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>elif isinstance(other, dict):<EOL><INDENT>if (<EOL>self._tp == other['<STR_LIT>']<EOL>and self._tn == other['<STR_LIT>']<EOL>and self._fp == other['<STR_LIT>']<EOL>and self._fn == other['<STR_LIT>']<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Perform eqality (==) comparison.

        Compares a ConfusionTable to another ConfusionTable or its equivalent
        in the form of a tuple, list, or dict.

        Parameters
        ----------
        other : ConfusionTable
            Another ConfusionTable object to compare to

        Returns
        -------
        bool
            True if two ConfusionTables are the same object or all four of
            their attributes are equal

        Examples
        --------
        >>> ct1 = ConfusionTable(120, 60, 20, 30)
        >>> ct2 = ConfusionTable(120, 60, 20, 30)
        >>> ct3 = ConfusionTable(60, 30, 10, 15)

        >>> ct1 == ct2
        True
        >>> ct1 == ct3
        False

        >>> ct1 != ct2
        False
        >>> ct1 != ct3
        True