o
    >e                     @   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   T/var/www/html/humari/django-venv/lib/python3.10/site-packages/lxml/html/_setmixin.py__len__   s   
zSetMixin.__len__c                 C   s   | D ]	}||kr dS qdS )NTFr   )r   r   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)collections.abcr   ImportErrorr   r   r   r   r	   <module>   s    