def _val_to_store_info(self, val):
        """
        Transform val to a storable representation,
        returning a tuple of the flags, the length of the new value, and the new value itself.
        """
        if isinstance(val, str):
            return val, 0
        elif isinstance(val, int):
            return "%d" % val, Client._FLAG_INTEGER
        elif isinstance(val, long):
            return "%d" % val, Client._FLAG_LONG
        return pickle.dumps(val, protocol=pickle.HIGHEST_PROTOCOL), Client._FLAG_PICKLE
Transform val to a storable representation,
        returning a tuple of the flags, the length of the new value, and the new value itself.