U
    ~fhy                     @   s$   d Z ddlmZ G dd deZdS )zz
Utility list for top level containers that contain one type of element

Provides the necessary API to read and write XML
    )Elementc                       sH   e Zd Zedd Zedd Zedd Zdd Z fd	d
Z	  Z
S )ElementListc                 C   s   t d S NNotImplementedErrorself r	   B/tmp/pip-unpacked-wheel-eyn_au5k/openpyxl/descriptors/container.pytagname   s    zElementList.tagnamec                 C   s   t d S r   r   r   r	   r	   r
   expected_type   s    zElementList.expected_typec                    s    fdd|D } |S )Nc                    s   g | ]} j |qS r	   )r   	from_tree).0elclsr	   r
   
<listcomp>   s     z)ElementList.from_tree.<locals>.<listcomp>r	   )r   treelr	   r   r
   r      s    zElementList.from_treec                 C   s&   t | j}| D ]}||  q|S r   )r   r   appendto_tree)r   	containerr   r	   r	   r
   r      s    
zElementList.to_treec                    s8   t || js(td| j dt| dt | d S )NzValue must of type  z	 provided)
isinstancer   	TypeErrortypesuperr   )r   value	__class__r	   r
   r   &   s    zElementList.append)__name__
__module____qualname__propertyr   r   classmethodr   r   r   __classcell__r	   r	   r   r
   r      s   


r   N)__doc__Zopenpyxl.xml.functionsr   listr   r	   r	   r	   r
   <module>   s   