Viewing File: /opt/alt/python35/lib64/python3.5/__pycache__/_weakrefset.cpython-35.pyc



จีYfIใ@sCddlmZdgZGdd„dƒZGdd„dƒZdS)้)ฺrefฺWeakSetc@s4eZdZdd„Zdd„Zdd„ZdS)ฺ_IterationGuardcCst|ƒ|_dS)N)rฺ
weakcontainer)ฺselfrฉr๚0/opt/alt/python35/lib64/python3.5/_weakrefset.pyฺ__init__sz_IterationGuard.__init__cCs,|jƒ}|dk	r(|jj|ƒ|S)N)rฺ
_iteratingฺadd)rฺwrrrฺ	__enter__sz_IterationGuard.__enter__cCsB|jƒ}|dk	r>|j}|j|ƒ|s>|jƒdS)N)rr
ฺremoveฺ_commit_removals)rฺeฺtฺbrฺsrrrฺ__exit__s	
z_IterationGuard.__exit__N)ฺ__name__ฺ
__module__ฺ__qualname__r	r
rrrrrr
src@sŸeZdZddd„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&dS)>rNcCs\tƒ|_t|ƒdd„}||_g|_tƒ|_|dk	rX|j|ƒdS)NcSsE|ƒ}|dk	rA|jr1|jj|ƒn|jj|ƒdS)N)r
ฺ_pending_removalsฺappendฺdataฺdiscard)ฺitemฺselfrefrrrrฺ_remove&s
		z!WeakSet.__init__.<locals>._remove)ฺsetrrrrr
ฺupdate)rrrrrrr	$s		zWeakSet.__init__cCs6|j}|jj}x|r1||jƒƒqWdS)N)rrrฺpop)rฺlrrrrr4s		zWeakSet._commit_removalsc
csFt|ƒ3x+|jD] }|ƒ}|dk	r|VqWWdQRXdS)N)rr)rฺitemrefrrrrฺ__iter__:s

	zWeakSet.__iter__cCst|jƒt|jƒS)N)ฺlenrr)rrrrฺ__len__CszWeakSet.__len__cCs6yt|ƒ}Wntk
r(dSYnX||jkS)NF)rฺ	TypeErrorr)rrฺwrrrrฺ__contains__Fs

	zWeakSet.__contains__cCs%|jt|ƒft|ddƒfS)Nฺ__dict__)ฺ	__class__ฺlistฺgetattr)rrrrฺ
__reduce__MszWeakSet.__reduce__cCs3|jr|jƒ|jjt||jƒƒdS)N)rrrrrr)rrrrrrQs	
zWeakSet.addcCs$|jr|jƒ|jjƒdS)N)rrrฺclear)rrrrr/Vs	
z
WeakSet.clearcCs
|j|ƒS)N)r+)rrrrฺcopy[szWeakSet.copycCsk|jr|jƒxQy|jjƒ}Wntk
rItdƒ‚YnX|ƒ}|dk	r|SqWdS)Nzpop from empty WeakSet)rrrr!ฺKeyError)rr#rrrrr!^s	

	zWeakSet.popcCs-|jr|jƒ|jjt|ƒƒdS)N)rrrrr)rrrrrrjs	
zWeakSet.removecCs-|jr|jƒ|jjt|ƒƒdS)N)rrrrr)rrrrrros	
zWeakSet.discardcCs5|jr|jƒx|D]}|j|ƒqWdS)N)rrr)rฺotherฺelementrrrr ts	

zWeakSet.updatecCs|j|ƒ|S)N)r )rr2rrrฺ__ior__zs
zWeakSet.__ior__cCs|jƒ}|j|ƒ|S)N)r0ฺdifference_update)rr2ฺnewsetrrrฺ
difference~s
zWeakSet.differencecCs|j|ƒdS)N)ฺ__isub__)rr2rrrr5„szWeakSet.difference_updatecCsP|jr|jƒ||kr/|jjƒn|jjdd„|Dƒƒ|S)Ncss|]}t|ƒVqdS)N)r)ฺ.0rrrr๚	<genexpr>Œsz#WeakSet.__isub__.<locals>.<genexpr>)rrrr/r5)rr2rrrr8†s	
zWeakSet.__isub__cs ˆj‡fdd†|DƒƒS)Nc3s!|]}|ˆkr|VqdS)Nr)r9r)rrrr:sz'WeakSet.intersection.<locals>.<genexpr>)r+)rr2r)rrฺintersectionszWeakSet.intersectioncCs|j|ƒdS)N)ฺ__iand__)rr2rrrฺintersection_update“szWeakSet.intersection_updatecCs4|jr|jƒ|jjdd„|Dƒƒ|S)Ncss|]}t|ƒVqdS)N)r)r9rrrrr:˜sz#WeakSet.__iand__.<locals>.<genexpr>)rrrr=)rr2rrrr<•s	
zWeakSet.__iand__cCs|jjdd„|DƒƒS)Ncss|]}t|ƒVqdS)N)r)r9rrrrr:œsz#WeakSet.issubset.<locals>.<genexpr>)rฺissubset)rr2rrrr>›szWeakSet.issubsetcCs |jtdd„|DƒƒkS)Ncss|]}t|ƒVqdS)N)r)r9rrrrr: sz!WeakSet.__lt__.<locals>.<genexpr>)rr)rr2rrrฺ__lt__ŸszWeakSet.__lt__cCs|jjdd„|DƒƒS)Ncss|]}t|ƒVqdS)N)r)r9rrrrr:ฃsz%WeakSet.issuperset.<locals>.<genexpr>)rฺ
issuperset)rr2rrrr@ขszWeakSet.issupersetcCs |jtdd„|DƒƒkS)Ncss|]}t|ƒVqdS)N)r)r9rrrrr:งsz!WeakSet.__gt__.<locals>.<genexpr>)rr)rr2rrrฺ__gt__ฆszWeakSet.__gt__cCs6t||jƒstS|jtdd„|DƒƒkS)Ncss|]}t|ƒVqdS)N)r)r9rrrrr:ฌsz!WeakSet.__eq__.<locals>.<genexpr>)ฺ
isinstancer+ฺNotImplementedrr)rr2rrrฺ__eq__ฉszWeakSet.__eq__cCs|jƒ}|j|ƒ|S)N)r0ฺsymmetric_difference_update)rr2r6rrrฺsymmetric_differenceฎs
zWeakSet.symmetric_differencecCs|j|ƒdS)N)ฺ__ixor__)rr2rrrrEดsz#WeakSet.symmetric_difference_updatecsVˆjrˆjƒˆ|kr/ˆjjƒn#ˆjj‡fdd†|DƒƒˆS)Nc3s!|]}t|ˆjƒVqdS)N)rr)r9r)rrrr:ผsz#WeakSet.__ixor__.<locals>.<genexpr>)rrrr/rE)rr2r)rrrGถs	
#zWeakSet.__ixor__cCs |jdd„||fDƒƒS)Ncss"|]}|D]}|Vq
qdS)Nr)r9rrrrrr:ภsz WeakSet.union.<locals>.<genexpr>)r+)rr2rrrฺunionฟsz
WeakSet.unioncCst|j|ƒƒdkS)Nr)r%r;)rr2rrrฺ
isdisjointรszWeakSet.isdisjoint)'rrrr	rr$r&r)r.rr/r0r!rrr r4r7ฺ__sub__r5r8r;ฺ__and__r=r<r>ฺ__le__r?r@ฺ__ge__rArDrFฺ__xor__rErGrHฺ__or__rIrrrrr#sH			N)ฺ_weakrefrฺ__all__rrrrrrฺ<module>s	
Back to Directory File Manager