ó õùPc@sIddlmZdgZdefd„ƒYZdefd„ƒYZdS(iÿÿÿÿ(treftWeakSett_IterationGuardcBs#eZd„Zd„Zd„ZRS(cCst|ƒ|_dS(N(Rt weakcontainer(tselfR((s.\lib\_weakrefset.pyt__init__scCs/|jƒ}|dk r+|jj|ƒn|S(N(RtNonet _iteratingtadd(Rtw((s.\lib\_weakrefset.pyt __enter__s  cCsH|jƒ}|dk rD|j}|j|ƒ|sD|jƒqDndS(N(RRRtremovet_commit_removals(RtetttbR ts((s.\lib\_weakrefset.pyt__exit__s     (t__name__t __module__RR R(((s.\lib\_weakrefset.pyR s  cBsLeZdd„Zd„Zd„Zd„Zd„Zd„ZdZ d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„ZeZd„Zd„Zd„ZeZd„Zd„Zd„ZeZd„Zd„ZeZd„Z d„Z!d„Z"e"Z#d„Z$d„Z%d„Z&e&Z'd„Z(RS( cCs\tƒ|_t|ƒd„}||_g|_tƒ|_|dk rX|j|ƒndS(NcSsH|ƒ}|dk rD|jr1|jj|ƒqD|jj|ƒndS(N(RRt_pending_removalstappendtdatatdiscard(titemtselfrefR((s.\lib\_weakrefset.pyt_remove&s    (tsetRRRRRRtupdate(RRR((s.\lib\_weakrefset.pyR$s     cCs6|j}|jj}x|r1||jƒƒqWdS(N(RRRtpop(RtlR((s.\lib\_weakrefset.pyR 4s   ccsHt|ƒ6x.|jD]#}|ƒ}|dk r|VqqWWdQXdS(N(RRR(RtitemrefR((s.\lib\_weakrefset.pyt__iter__:s    cCstd„|jDƒƒS(Ncss|]}|ƒdk VqdS(N(R(t.0tx((s.\lib\_weakrefset.pys Bs(tsumR(R((s.\lib\_weakrefset.pyt__len__AscCst|ƒ|jkS(N(RR(RR((s.\lib\_weakrefset.pyt __contains__DscCs%|jt|ƒft|ddƒfS(Nt__dict__(t __class__tlisttgetattrR(R((s.\lib\_weakrefset.pyt __reduce__GscCs6|jr|jƒn|jjt||jƒƒdS(N(RR RRRR(RR((s.\lib\_weakrefset.pyRMs  cCs'|jr|jƒn|jjƒdS(N(RR Rtclear(R((s.\lib\_weakrefset.pyR+Rs  cCs |j|ƒS(N(R'(R((s.\lib\_weakrefset.pytcopyWscCss|jr|jƒnxVtrny|jjƒ}Wntk rQtdƒ‚nX|ƒ}|dk r|SqWdS(Nspop from empty WeakSet(RR tTrueRRtKeyErrorR(RRR((s.\lib\_weakrefset.pyRZs      cCs0|jr|jƒn|jjt|ƒƒdS(N(RR RR R(RR((s.\lib\_weakrefset.pyR fs  cCs0|jr|jƒn|jjt|ƒƒdS(N(RR RRR(RR((s.\lib\_weakrefset.pyRks  cCs`|jr|jƒnt||jƒr>|jj|jƒnx|D]}|j|ƒqEWdS(N(RR t isinstanceR'RRR(Rtothertelement((s.\lib\_weakrefset.pyRps    cCs|j|ƒ|S(N(R(RR0((s.\lib\_weakrefset.pyt__ior__ys cCsLt||jƒs$|j|ƒ}n||jƒ}|jƒ}||_|S(N(R/R'R(RR0tmethodtnewdatatnewset((s.\lib\_weakrefset.pyt_apply~s   cCs|j||jjƒS(N(R6Rt difference(RR0((s.\lib\_weakrefset.pyR7†scCsP|jr|jƒn||kr2|jjƒn|jjd„|DƒƒdS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys s(RR RR+tdifference_update(RR0((s.\lib\_weakrefset.pyR8Šs    cCsP|jr|jƒn||kr2|jjƒn|jjd„|Dƒƒ|S(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys —s(RR RR+R8(RR0((s.\lib\_weakrefset.pyt__isub__‘s    cCs|j||jjƒS(N(R6Rt intersection(RR0((s.\lib\_weakrefset.pyR:šscCs4|jr|jƒn|jjd„|DƒƒdS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ¡s(RR Rtintersection_update(RR0((s.\lib\_weakrefset.pyR;žs  cCs4|jr|jƒn|jjd„|Dƒƒ|S(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ¥s(RR RR;(RR0((s.\lib\_weakrefset.pyt__iand__¢s  cCs|jjd„|DƒƒS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ©s(Rtissubset(RR0((s.\lib\_weakrefset.pyR=¨scCs|jtd„|DƒƒkS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ­s(RR(RR0((s.\lib\_weakrefset.pyt__le__¬scCs|jjd„|DƒƒS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys °s(Rt issuperset(RR0((s.\lib\_weakrefset.pyR?¯scCs|jtd„|DƒƒkS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ´s(RR(RR0((s.\lib\_weakrefset.pyt__ge__³scCs3t||jƒstS|jtd„|DƒƒkS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys ¹s(R/R'tNotImplementedRR(RR0((s.\lib\_weakrefset.pyt__eq__¶scCs|j||jjƒS(N(R6Rtsymmetric_difference(RR0((s.\lib\_weakrefset.pyRC»scCsP|jr|jƒn||kr2|jjƒn|jjd„|DƒƒdS(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys Ås(RR RR+tsymmetric_difference_update(RR0((s.\lib\_weakrefset.pyRD¿s    cCsP|jr|jƒn||kr2|jjƒn|jjd„|Dƒƒ|S(Ncss|]}t|ƒVqdS(N(R(R!R((s.\lib\_weakrefset.pys Ìs(RR RR+RD(RR0((s.\lib\_weakrefset.pyt__ixor__Æs    cCs|j||jjƒS(N(R6Rtunion(RR0((s.\lib\_weakrefset.pyRFÏscCst|j|ƒƒdkS(Ni(tlenR:(RR0((s.\lib\_weakrefset.pyt isdisjointÓsN()RRRRR R R$R%R*t__hash__RR+R,RR RRR2R6R7t__sub__R8R9R:t__and__R;R<R=t__lt__R>R?t__gt__R@RBRCt__xor__RDRERFt__or__RH(((s.\lib\_weakrefset.pyR#sL                          N(t_weakrefRt__all__tobjectRR(((s.\lib\_weakrefset.pyts