class Ball(object):

    def __init__(self, color, size):
        self.color = color
        self.size = size

    def __eq__(self, other):
        """Override the default Equals behavior"""
        return self.color == other.color and self.size == other.size

    def __ne__(self, other):
        """Override the default Unequal behavior"""
        return self.color != other.color or self.size != other.size

ball1 = Ball('blue', 'small')
ball2 = Ball('blue', 'small')
ball3 = Ball('green', 'small')

print(ball1 == ball2) # Prints True :)
print(ball1 == ball3) # Prints False :)