def discrete(x, y):
    """Computes the discrete distance between two objects.

    Parameters
    ----------
    x : object
        Any object.
    y : object
        Any object.

    Returns
    -------
    distance : float
        Returns ``0.0`` if ``x == y``, ``1.0`` otherwise.
    """
    return 0.0 if x == y else 1.0