def __init__(self, *args, **kwargs):
        """
        Create a new List object.

        If the first argument (*data*) is an iterable object, create the new
        List with its values as the initial data.

        :param data: Initial data.
        :type data: iterable
        :param redis: Redis client instance. If not provided, default Redis
                      connection is used.
        :type redis: :class:`redis.StrictRedis`
        :param key: Redis key for the collection. Collections with the same key
                    point to the same data. If not provided, a random
                    string is generated.
        :type key: str
        :param writeback: If ``True`` keep a local cache of changes for storing
                          modifications to mutable values. Changes will be
                          written to Redis after calling the ``sync`` method.
        :type writeback: bool
        """
        data = args[0] if args else kwargs.pop('data', None)
        writeback = kwargs.pop('writeback', False)
        super().__init__(**kwargs)

        self.__marker = uuid.uuid4().hex
        self.writeback = writeback
        self.cache = {}

        if data:
            self.extend(data)
def __init__ ( self , * args , ** kwargs ) : data = args [ 0 ] if args else kwargs . pop ( 'data' , None ) writeback = kwargs . pop ( 'writeback' , False ) super ( ) . __init__ ( ** kwargs ) self . __marker = uuid . uuid4 ( ) . hex self . writeback = writeback self . cache = { } if data : self . extend ( data )
Create a new List object.

        If the first argument (*data*) is an iterable object, create the new
        List with its values as the initial data.

        :param data: Initial data.
        :type data: iterable
        :param redis: Redis client instance. If not provided, default Redis
                      connection is used.
        :type redis: :class:`redis.StrictRedis`
        :param key: Redis key for the collection. Collections with the same key
                    point to the same data. If not provided, a random
                    string is generated.
        :type key: str
        :param writeback: If ``True`` keep a local cache of changes for storing
                          modifications to mutable values. Changes will be
                          written to Redis after calling the ``sync`` method.
        :type writeback: bool