b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/weakref.pyo
Size13.06 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:24
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sÕdZddkZddklZlZlZlZlZlZl Z ddk
l Z eefZ ddddd d
d d d
ddg Z
deifd��YZdefd��YZd eifd��YZdS(s{Weak reference support for Python.

This module is an implementation of PEP 205:

http://www.python.org/dev/peps/pep-0205/
iÿÿÿÿN(tgetweakrefcountt getweakrefstreftproxytCallableProxyTypet ProxyTypet
ReferenceType(tReferenceErrorRRRRtWeakKeyDictionaryRRRRt
ProxyTypestWeakValueDictionarycBsËeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z dd�Z d �Z d
�Z
d �Zd �Zd
�Zd�Zd�Zd�Zdd�Zdd�Zd�Zd�ZRS(s�Mapping class that references values weakly.

Entries in the dictionary will be discarded when no strong
reference to the value exists anymore
cOs5t|�d�}||_tii|||�dS(NcSs+|�}|dj o|i|i=ndS(N(tNonetdatatkey(twrtselfreftself((s/usr/lib64/python2.6/weakref.pytremove.s 
(Rt_removetUserDictt__init__(RtargstkwR((s/usr/lib64/python2.6/weakref.pyR-s cCs2|i|�}|djo
t|�n|SdS(N(R R tKeyError(RR
to((s/usr/lib64/python2.6/weakref.pyt __getitem__5s

cCs5y|i|�}Wntj
otSX|dj S(N(R RtFalseR (RR
R((s/usr/lib64/python2.6/weakref.pyt __contains__<s
cCs5y|i|�}Wntj
otSX|dj S(N(R RRR (RR
R((s/usr/lib64/python2.6/weakref.pythas_keyCs
cCsdt|�S(Ns<WeakValueDictionary at %s>(tid(R((s/usr/lib64/python2.6/weakref.pyt__repr__JscCs t||i|�|i|<dS(N(tKeyedRefRR (RR
tvalue((s/usr/lib64/python2.6/weakref.pyt __setitem__MscCsQt�}xA|ii�D]0\}}|�}|dj o|||<qqW|S(N(R
R titemsR (RtnewR
RR((s/usr/lib64/python2.6/weakref.pytcopyPs   
cCsKy|i|}Wntj
o|SX|�}|djo|S|SdS(N(R RR (RR
tdefaultRR((s/usr/lib64/python2.6/weakref.pytgetXs 
cCsWg}xJ|ii�D]9\}}|�}|dj o|i||f�qqW|S(N(R R"R tappend(RtLR
RR((s/usr/lib64/python2.6/weakref.pyR"es  
ccsFx?|ii�D].}|�}|dj o|i|fVqqWdS(N(R t
itervaluesR R
(RRR ((s/usr/lib64/python2.6/weakref.pyt iteritemsms
 
cCs
|ii�S(N(R titerkeys(R((s/usr/lib64/python2.6/weakref.pyR+sscCs
|ii�S(N(R R+(R((s/usr/lib64/python2.6/weakref.pyt__iter__vscCs
|ii�S(s�Return an iterator that yields the weak references to the values.

The references are not guaranteed to be 'live' at the time
they are used, so the result of calling the references needs
to be checked before being used. This can be used to avoid
creating references that will cause the garbage collector to
keep the values around longer than needed.

(R R)(R((s/usr/lib64/python2.6/weakref.pyt
itervaluerefsys
ccs=x6|ii�D]%}|�}|dj o |VqqWdS(N(R R)R (RRtobj((s/usr/lib64/python2.6/weakref.pyR)�s
 
cCs@x9|ii�\}}|�}|dj o ||fSqdS(N(R tpopitemR (RR
RR((s/usr/lib64/python2.6/weakref.pyR/�s
 
cGsdy|ii|��}Wn&tj
o|o |dS�nX|djo
t|�n|SdS(Ni(R tpopRR (RR
RR((s/usr/lib64/python2.6/weakref.pyR0�s 

cCsOy|i|}Wn0tj
o$t||i|�|i|<|SX|�SdS(N(R RRR(RR
R%R((s/usr/lib64/python2.6/weakref.pyt
setdefault�s cKs�|i}|dj o`t|d�pth�|�}nx7|i�D]%\}}t||i|�||<qIWnt|�o|i|�ndS(NR"( R R thasattrttypeR"RRtlentupdate(RtdicttkwargstdR
R((s/usr/lib64/python2.6/weakref.pyR5§s 

!
cCs
|ii�S(s~Return a list of weak references to the values.

The references are not guaranteed to be 'live' at the time
they are used, so the result of calling the references needs
to be checked before being used. This can be used to avoid
creating references that will cause the garbage collector to
keep the values around longer than needed.

(R tvalues(R((s/usr/lib64/python2.6/weakref.pyt valuerefs±s
cCsKg}x>|ii�D]-}|�}|dj o|i|�qqW|S(N(R R9R R'(RR(RR((s/usr/lib64/python2.6/weakref.pyR9½s 
N(t__name__t
__module__t__doc__RRRRRR!R$R R&R"R*R+R,R-R)R/R0R1R5R:R9(((s/usr/lib64/python2.6/weakref.pyR
!s*       
     
RcBs&eZdZdZd�Zd�ZRS(s[Specialized reference that includes a key corresponding to the value.

This is used in the WeakValueDictionary to avoid having to create
a function object for each key stored in the mapping. A shared
callback object can use the 'key' attribute of a KeyedRef instead
of getting a reference to the key from an enclosing scope.

R
cCs"ti|||�}||_|S(N(Rt__new__R
(R3tobtcallbackR
R((s/usr/lib64/python2.6/weakref.pyR>Òs cCstt|�i||�dS(N(tsuperRR(RR?R@R
((s/usr/lib64/python2.6/weakref.pyR×s(skey(R;R<R=t __slots__R>R(((s/usr/lib64/python2.6/weakref.pyRÆs cBs×eZdZdd�Zd�Zd�Zd�Zd�Zd�Z dd�Z
d�Z d �Z d
�Z
d �Zd �Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zdd�ZRS(s� Mapping class that references keys weakly.

Entries in the dictionary will be discarded when there is no
longer a strong reference to the key. This can be used to
associate additional data with an object owned by other parts of
an application without adding attributes to those objects. This
can be especially useful with objects that override attribute
accesses.
cCsFh|_t|�d�}||_|dj o|i|�ndS(NcSs(|�}|dj o|i|=ndS(N(R R (tkRR((s/usr/lib64/python2.6/weakref.pyRès 
(R RRR R5(RR6R((s/usr/lib64/python2.6/weakref.pyRæs
  
cCs|it|�=dS(N(R R(RR
((s/usr/lib64/python2.6/weakref.pyt __delitem__ïscCs|it|�S(N(R R(RR
((s/usr/lib64/python2.6/weakref.pyRòscCsdt|�S(Ns<WeakKeyDictionary at %s>(R(R((s/usr/lib64/python2.6/weakref.pyRõscCs||it||i�<dS(N(R RR(RR
R ((s/usr/lib64/python2.6/weakref.pyR!øscCsQt�}xA|ii�D]0\}}|�}|dj o|||<qqW|S(N(RR R"R (RR#R
R R((s/usr/lib64/python2.6/weakref.pyR$ûs   
cCs|iit|�|�S(N(R R&R(RR
R%((s/usr/lib64/python2.6/weakref.pyR&scCs4yt|�}Wntj
odSX||ijS(Ni(Rt TypeErrorR (RR
R((s/usr/lib64/python2.6/weakref.pyRs
cCs4yt|�}Wntj
odSX||ijS(Ni(RRER (RR
R((s/usr/lib64/python2.6/weakref.pyR
s
cCsWg}xJ|ii�D]9\}}|�}|dj o|i||f�qqW|S(N(R R"R R'(RR(R
R R((s/usr/lib64/python2.6/weakref.pyR"s  
ccsIxB|ii�D]1\}}|�}|dj o||fVqqWdS(N(R R*R (RRR R
((s/usr/lib64/python2.6/weakref.pyR*s
  
cCs
|ii�S(s�Return an iterator that yields the weak references to the keys.

The references are not guaranteed to be 'live' at the time
they are used, so the result of calling the references needs
to be checked before being used. This can be used to avoid
creating references that will cause the garbage collector to
keep the keys around longer than needed.

(R R+(R((s/usr/lib64/python2.6/weakref.pyt iterkeyrefs"s
ccs=x6|ii�D]%}|�}|dj o |VqqWdS(N(R R+R (RRR.((s/usr/lib64/python2.6/weakref.pyR+.s
 
cCs
|i�S(N(R+(R((s/usr/lib64/python2.6/weakref.pyR,4scCs
|ii�S(N(R R)(R((s/usr/lib64/python2.6/weakref.pyR)7scCs
|ii�S(szReturn a list of weak references to the keys.

The references are not guaranteed to be 'live' at the time
they are used, so the result of calling the references needs
to be checked before being used. This can be used to avoid
creating references that will cause the garbage collector to
keep the keys around longer than needed.

(R tkeys(R((s/usr/lib64/python2.6/weakref.pytkeyrefs:s
cCsKg}x>|ii�D]-}|�}|dj o|i|�qqW|S(N(R RGR R'(RR(RR((s/usr/lib64/python2.6/weakref.pyRGFs 
cCs@x9|ii�\}}|�}|dj o ||fSqdS(N(R R/R (RR
R R((s/usr/lib64/python2.6/weakref.pyR/Ns
 
cGs|iit|�|�S(N(R R0R(RR
R((s/usr/lib64/python2.6/weakref.pyR0UscCs|iit||i�|�S(N(R R1RR(RR
R%((s/usr/lib64/python2.6/weakref.pyR1XscKs�|i}|dj o]t|d�pth�|�}nx4|i�D]"\}}||t||i�<qIWnt|�o|i|�ndS(NR"( R R R2R3R"RRR4R5(RR6R7R8R
R ((s/usr/lib64/python2.6/weakref.pyR5[s 


N(R;R<R=R RRDRRR!R$R&RRR"R*RFR+R,R)RHRGR/R0R1R5(((s/usr/lib64/python2.6/weakref.pyRÛs,                  (R=Rt_weakrefRRRRRRRt
exceptionsRR t__all__R
RR(((s/usr/lib64/python2.6/weakref.pyt<module>s 4    ¥