def cmp(x, y):
    """Compare the two objects x and y and return an integer according to the outcome.

    Args:
        x: The first number to compare.
        y: The second number to compare.

    Returns:
        A negative value if x < y, zero if x == y and  positive if x > y.
    """
    return (x > y) - (x < y)
