(self, other)
return self._data == other._data
Equality operator.

        Two tokens are equal if they are of the same type and have
        equal data. Positions are insignificant.

        Args:
          other: The other Token to compare.
Equality operator.
Equality operator .
def __eq__(self, other):
        """Equality operator.

        Two tokens are equal if they are of the same type and have
        equal data. Positions are insignificant.

        Args:
          other: The other Token to compare.
        """
        if (type(self) != type(other) or
                not isinstance(self, other.__class__)):
            return False
        if (isinstance(self, TokKeyword) and
                isinstance(other, TokKeyword)):
            return self._data.lower() == other._data.lower()
        return self._data == other._data
def __eq__ ( self , other ) : if ( type ( self ) != type ( other ) or not isinstance ( self , other . __class__ ) ) : return False if ( isinstance ( self , TokKeyword ) and isinstance ( other , TokKeyword ) ) : return self . _data . lower ( ) == other . _data . lower ( ) return self . _data == other . _data