(self, *items)
Args:
          items (objects): items to form a collection from.
            every item gets wrapped with :py:obj:`ensure_conversion`
Args:
          items (objects): items to form a collection from.
            every item gets wrapped with :py:obj:`ensure_conversion`
Args : items ( objects ) : items to form a collection from . every item gets wrapped with : py : obj : ensure_conversion
def __init__(self, *items):
        """
        Args:
          items (objects): items to form a collection from.
            every item gets wrapped with :py:obj:`ensure_conversion`
        """
        super().__init__()
        resulting_items = []
        condition_to_item_pairs = None
        for item in items:
            item = self.ensure_conversion(item)
            if condition_to_item_pairs is None:
                if isinstance(item, OptionalCollectionItem):
                    condition_to_item_pairs = [
                        (None, item_) for item_ in resulting_items
                    ]
                    condition_to_item_pairs.append(
                        (item.condition, item.conversion)
                    )
                    resulting_items = None
                else:
                    resulting_items.append(item)
            else:
                condition_to_item_pairs.append(
                    (item.condition, item.conversion)
                    if isinstance(item, OptionalCollectionItem)
                    else (None, item)
                )
        self.items = resulting_items
        self.condition_to_item_pairs = condition_to_item_pairs
def __init__ ( self , * items ) : super ( ) . __init__ ( ) resulting_items = [ ] condition_to_item_pairs = None for item in items : item = self . ensure_conversion ( item ) if condition_to_item_pairs is None : if isinstance ( item , OptionalCollectionItem ) : condition_to_item_pairs = [ ( None , item_ ) for item_ in resulting_items ] condition_to_item_pairs . append ( ( item . condition , item . conversion ) ) resulting_items = None else : resulting_items . append ( item ) else : condition_to_item_pairs . append ( ( item . condition , item . conversion ) if isinstance ( item , OptionalCollectionItem ) else ( None , item ) ) self . items = resulting_items self . condition_to_item_pairs = condition_to_item_pairs