def set(
        self,
        value,
        custom_command=True,
        quantity_command=True,
    ):
        """Set value of this widget.

        By value, we mean a list of values, which is the
        kind of data this widget list object stores.

        Parameters
        ==========
        value (iterable)
            any iterable.
        custom_command (boolean)
            indicates whether to execute the custom command
            or not.
        quantity_command (boolean0
            indicates whether to execute the quantity
            command or not.
        """
        ### turn the received value argument into a list
        value = list(value)

        ### if the value is the same as the current one,
        ### there's no point in executing the operation,
        ### so we return earlier
        if value == self.value:
            return

        ### also, if the length of the specified value
        ### isn't allowed, we also cancel the operation
        ### by returning earlier

        length = len(value)

        if not length >= self.min_len or not length <= self.max_len:
            return

        ### if we reach this point in the method, it means
        ### there were no reasons to not set the new value,
        ### so we do so in the next steps

        ## backup current value
        value_backup = self.value

        ## update the current value
        self.value = value

        ## align the add_button with the topleft
        ## of the rect
        self.add_button.rect.topleft = self.rect.topleft

        ## clear the all_objects items and add the
        ## add_button again

        self.all_objects.clear()
        self.all_objects.append(self.add_button)

        ## try instantiating each widget (this is both
        ## the implementation of changes and the final
        ## check, because things can still go wrong when
        ## instantiating widgets for each item of the
        ## value

        try:

            for item_value in self.value:

                self.add_item(item_value, False, False, False, False)

        ## if anything does fail, print the error and restore
        ## the original value

        except Exception as err:

            print(err)
            self.set(value_backup, False, False)

        ## otherwise, just perform the additional tasks,
        ## if requested

        else:

            if custom_command:
                self.command()
            if quantity_command:
                self.quantity_command()

        ## finally reference the clickable objects,
        ## regardless of whether the 'try' block above
        ## succeeded or not
        self.reference_clickables()
Set value of this widget.

        By value, we mean a list of values, which is the
        kind of data this widget list object stores.

        Parameters
        ==========
        value (iterable)
            any iterable.
        custom_command (boolean)
            indicates whether to execute the custom command
            or not.
        quantity_command (boolean0
            indicates whether to execute the quantity
            command or not.
        
nodezator/our3rdlibs/iterablewidget/op.py