o
    ;/b   ã                   @   sD   zd dl mZ W n ey   d dlmZ Y nw G dd„ deƒZdS )é    )Ú
MutableSetc                   @   s€   e Zd ZdZdd„ Zdd„ ZejZej	Z
ejZejZejZejZdd„ Zdd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Zedd„ ƒZdS )ÚSetMixinzA
    Mix-in for sets.  You must define __iter__, add, remove
    c                 C   s   d}| D ]}|d7 }q|S )Nr   é   © )ÚselfÚlengthÚitemr   r   ú5/usr/lib/python3/dist-packages/lxml/html/_setmixin.pyÚ__len__   s   
zSetMixin.__len__c                 C   s   | D ]	}||kr dS qdS )NTFr   )r   r   Zhas_itemr   r   r	   Ú__contains__   s
   ÿzSetMixin.__contains__c                 C   s   t | ƒS ©N©Úset)r   r   r   r	   Úcopy!   s   zSetMixin.copyc                 C   s   | |O } d S r   r   ©r   Úotherr   r   r	   Úupdate$   ó   zSetMixin.updatec                 C   s   | |M } d S r   r   r   r   r   r	   Úintersection_update'   r   zSetMixin.intersection_updatec                 C   s   | |8 } d S r   r   r   r   r   r	   Údifference_update*   r   zSetMixin.difference_updatec                 C   s   | |N } d S r   r   r   r   r   r	   Úsymmetric_difference_update-   r   z$SetMixin.symmetric_difference_updatec                 C   s&   z|   |¡ W d S  ty   Y d S w r   )ÚremoveÚKeyError)r   r   r   r   r	   Údiscard0   s
   ÿzSetMixin.discardc                 C   s   t |ƒS r   r   )ÚclsÚitr   r   r	   Ú_from_iterable6   s   zSetMixin._from_iterableN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   Ú__le__ÚissubsetÚ__ge__Ú
issupersetÚ__or__ÚunionÚ__and__ÚintersectionÚ__sub__Ú
differenceÚ__xor__Úsymmetric_differencer   r   r   r   r   r   Úclassmethodr   r   r   r   r	   r      s$    r   N)Zcollections.abcr   ÚImportErrorÚcollectionsr   r   r   r   r	   Ú<module>   s    ÿ