Your IP : 3.21.105.222


Current Path : /opt/alt/python39/lib64/python3.9/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/__pycache__/_weakrefset.cpython-39.opt-1.pyc

a

R�f#�@s>ddlmZddlmZdgZGdd�d�ZGdd�d�ZdS)���ref)�GenericAlias�WeakSetc@s$eZdZdd�Zdd�Zdd�ZdS)�_IterationGuardcCst|�|_dS�N)r�
weakcontainer)�selfr�r
�0/opt/alt/python39/lib64/python3.9/_weakrefset.py�__init__sz_IterationGuard.__init__cCs |��}|dur|j�|�|Sr)r�
_iterating�add)r	�wr
r
r�	__enter__sz_IterationGuard.__enter__cCs0|��}|dur,|j}|�|�|s,|��dSr)rr
�remove�_commit_removals)r	�e�t�br�sr
r
r�__exit__s
z_IterationGuard.__exit__N)�__name__�
__module__�__qualname__rrrr
r
r
rrsrc@s&eZdZd@dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZeZd d!�Zd"d#�Zd$d%�ZeZd&d'�Zd(d)�Zd*d+�ZeZd,d-�Zd.d/�ZeZd0d1�Zd2d3�Zd4d5�Z e Z!d6d7�Z"d8d9�Z#d:d;�Z$e$Z%d<d=�Z&d>d?�Z'e(e)�Z*dS)ArNcCsBt�|_t|�fdd�}||_g|_t�|_|dur>|�|�dS)NcSs2|�}|dur.|jr"|j�|�n|j�|�dSr)r
�_pending_removals�append�data�discard)�itemZselfrefr	r
r
r�_remove's
z!WeakSet.__init__.<locals>._remove)�setrrr rr
�update)r	rr r
r
rr%szWeakSet.__init__cCs>|jj}|jj}z
|�}Wnty.YdS0||�qdSr)r�poprr�
IndexError)r	r#rrr
r
rr5s
zWeakSet._commit_removalsccsLt|��0|jD]}|�}|dur|VqWd�n1s>0YdSr)rr�r	Zitemrefrr
r
r�__iter__?s


zWeakSet.__iter__cCst|j�t|j�Sr)�lenrr�r	r
r
r�__len__HszWeakSet.__len__cCs,zt|�}Wnty YdS0||jvS)NF)r�	TypeErrorr)r	rZwrr
r
r�__contains__Ks
zWeakSet.__contains__cCs|jt|�ft|dd�fS)N�__dict__)�	__class__�list�getattrr(r
r
r�
__reduce__Rs
�zWeakSet.__reduce__cCs&|jr|��|j�t||j��dSr)rrrrrr �r	rr
r
rrVszWeakSet.addcCs|jr|��|j��dSr)rrr�clearr(r
r
rr2[sz
WeakSet.clearcCs
|�|�Sr�r-r(r
r
r�copy`szWeakSet.copycCsR|jr|��z|j��}Wnty8td�d�Yn0|�}|dur|SqdS)Nzpop from empty WeakSet)rrrr#�KeyErrorr%r
r
rr#cszWeakSet.popcCs"|jr|��|j�t|��dSr)rrrrrr1r
r
rroszWeakSet.removecCs"|jr|��|j�t|��dSr)rrrrrr1r
r
rrtszWeakSet.discardcCs&|jr|��|D]}|�|�qdSr)rrr)r	�otherZelementr
r
rr"yszWeakSet.updatecCs|�|�|Sr)r"�r	r6r
r
r�__ior__s
zWeakSet.__ior__cCs|��}|�|�|Sr)r4�difference_update�r	r6Znewsetr
r
r�
difference�s
zWeakSet.differencecCs|�|�dSr)�__isub__r7r
r
rr9�szWeakSet.difference_updatecCs<|jr|��||ur"|j��n|j�dd�|D��|S)Ncss|]}t|�VqdSrr��.0rr
r
r�	<genexpr>��z#WeakSet.__isub__.<locals>.<genexpr>)rrrr2r9r7r
r
rr<�szWeakSet.__isub__cs���fdd�|D��S)Nc3s|]}|�vr|VqdSrr
r=r(r
rr?�r@z'WeakSet.intersection.<locals>.<genexpr>r3r7r
r(r�intersection�szWeakSet.intersectioncCs|�|�dSr)�__iand__r7r
r
r�intersection_update�szWeakSet.intersection_updatecCs(|jr|��|j�dd�|D��|S)Ncss|]}t|�VqdSrrr=r
r
rr?�r@z#WeakSet.__iand__.<locals>.<genexpr>)rrrrCr7r
r
rrB�szWeakSet.__iand__cCs|j�dd�|D��S)Ncss|]}t|�VqdSrrr=r
r
rr?�r@z#WeakSet.issubset.<locals>.<genexpr>)r�issubsetr7r
r
rrD�szWeakSet.issubsetcCs|jttt|��kSr�rr!�maprr7r
r
r�__lt__�szWeakSet.__lt__cCs|j�dd�|D��S)Ncss|]}t|�VqdSrrr=r
r
rr?�r@z%WeakSet.issuperset.<locals>.<genexpr>)r�
issupersetr7r
r
rrH�szWeakSet.issupersetcCs|jttt|��kSrrEr7r
r
r�__gt__�szWeakSet.__gt__cCs$t||j�stS|jttt|��kSr)�
isinstancer-�NotImplementedrr!rFrr7r
r
r�__eq__�szWeakSet.__eq__cCs|��}|�|�|Sr)r4�symmetric_difference_updater:r
r
r�symmetric_difference�s
zWeakSet.symmetric_differencecCs|�|�dSr)�__ixor__r7r
r
rrM�sz#WeakSet.symmetric_difference_updatecs@�jr����|ur"�j��n�j��fdd�|D���S)Nc3s|]}t|�j�VqdSr)rr r=r(r
rr?�r@z#WeakSet.__ixor__.<locals>.<genexpr>)rrrr2rMr7r
r(rrO�szWeakSet.__ixor__cCs|�dd�||fD��S)Ncss|]}|D]
}|Vq
qdSrr
)r>rrr
r
rr?�r@z WeakSet.union.<locals>.<genexpr>r3r7r
r
r�union�sz
WeakSet.unioncCst|�|��dkS)Nr)r'rAr7r
r
r�
isdisjoint�szWeakSet.isdisjointcCs
t|j�Sr)�reprrr(r
r
r�__repr__�szWeakSet.__repr__)N)+rrrrrr&r)r+r0rr2r4r#rrr"r8r;�__sub__r9r<rA�__and__rCrBrD�__le__rGrH�__ge__rIrLrN�__xor__rMrOrP�__or__rQrS�classmethodr�__class_getitem__r
r
r
rr$sL

			N)�_weakrefr�typesr�__all__rrr
r
r
r�<module>s

?>