def __eq__(self, other):
        """Return ``self == other``.

        Returns
        -------
        equals : bool
            ``True`` if ``other`` is a `FunctionSpaceElement` with
            ``other.space == self.space``, and the functions for evaluation
            of ``self`` and ``other`` are the same, ``False``
            otherwise.

        Notes
        -----
        Since there is potentially a lot of function wrapping going on,
        it is very hard to find the "true" function behind a
        `FunctionSpaceElement` for comparison. Therefore, users
        should be aware that very often, comparison evaluates to ``False``
        even if two elements were generated from the same function.
        """
        if other is self:
            return True
        elif other not in self.space:
            return False

        # We try to unwrap one level, which is better than nothing
        if (self._call_has_out != other._call_has_out or
                self._call_out_optional != other._call_out_optional):
            return False

        if self._call_has_out:
            # Out-of-place can be wrapped in this case, so we compare only
            # the in-place methods.
            funcs_equal = self._call_in_place == other._call_in_place
        else:
            # Just the opposite of the first case
            funcs_equal = self._call_out_of_place == other._call_out_of_place

        return self.space == other.space and funcs_equal
def __eq__ ( self , other ) : if other is self : return True elif other not in self . space : return False if ( self . _call_has_out != other . _call_has_out or self . _call_out_optional != other . _call_out_optional ) : return False if self . _call_has_out : funcs_equal = self . _call_in_place == other . _call_in_place else : funcs_equal = self . _call_out_of_place == other . _call_out_of_place return self . space == other . space and funcs_equal
Return ``self == other``.

        Returns
        -------
        equals : bool
            ``True`` if ``other`` is a `FunctionSpaceElement` with
            ``other.space == self.space``, and the functions for evaluation
            of ``self`` and ``other`` are the same, ``False``
            otherwise.

        Notes
        -----
        Since there is potentially a lot of function wrapping going on,
        it is very hard to find the "true" function behind a
        `FunctionSpaceElement` for comparison. Therefore, users
        should be aware that very often, comparison evaluates to ``False``
        even if two elements were generated from the same function.