ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/weakref.cpython-33.pyo

�
zyMa�,c@s�dZddlmZmZmZmZmZmZmZddl	m
Z
mZddlZeefZ
ddddd	d
ddd
ddgZGdd�dej�ZGdd�de�ZGdd	�d	ej�ZdS(u{Weak reference support for Python.

This module is an implementation of PEP 205:

http://www.python.org/dev/peps/pep-0205/
i(ugetweakrefcountugetweakrefsurefuproxyuCallableProxyTypeu	ProxyTypeu
ReferenceType(uWeakSetu_IterationGuardNurefuproxyugetweakrefcountugetweakrefsuWeakKeyDictionaryu
ReferenceTypeu	ProxyTypeuCallableProxyTypeu
ProxyTypesuWeakValueDictionaryuWeakSetcBs|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZeZ
dd�Zd*dd�Zdd�Zdd�ZeZdd�Zdd�Zd d!�Zd"d#�Zd*d$d%�Zd*d&d'�Zd(d)�Zd*S(+uWeakValueDictionaryu�Mapping class that references values weakly.

    Entries in the dictionary will be discarded when no strong
    reference to the value exists anymore
    cOsTt|�dd�}||_g|_t�|_i|_}|j||�dS(NcSsH|�}|dk	rD|jr4|jj|j�qD|j|j=ndS(N(uNoneu
_iteratingu_pending_removalsuappendukeyudata(uwruselfrefuself((u,/opt/alt/python33/lib64/python3.3/weakref.pyuremove.s
		u,WeakValueDictionary.__init__.<locals>.remove(urefu_removeu_pending_removalsusetu
_iteratingudatauupdate(uselfuargsukwuremoveud((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__init__-s		
uWeakValueDictionary.__init__cCs0|j}|j}x|r+||j�=qWdS(N(u_pending_removalsudataupop(uselfulud((u,/opt/alt/python33/lib64/python3.3/weakref.pyu_commit_removals<s			u$WeakValueDictionary._commit_removalscCs3|j|�}|dkr+t|��n|SdS(N(udatauNoneuKeyError(uselfukeyuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__getitem__DsuWeakValueDictionary.__getitem__cCs$|jr|j�n|j|=dS(N(u_pending_removalsu_commit_removalsudata(uselfukey((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__delitem__Ks	
uWeakValueDictionary.__delitem__cCst|j�t|j�S(N(ulenudatau_pending_removals(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__len__PsuWeakValueDictionary.__len__cCs7y|j|�}Wntk
r,dSYnX|dk	S(NF(udatauKeyErroruFalseuNone(uselfukeyuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__contains__Ss

	u WeakValueDictionary.__contains__cCsdt|�S(Nu<WeakValueDictionary at %s>(uid(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__repr__ZsuWeakValueDictionary.__repr__cCs6|jr|j�nt||j|�|j|<dS(N(u_pending_removalsu_commit_removalsuKeyedRefu_removeudata(uselfukeyuvalue((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__setitem__]s	
uWeakValueDictionary.__setitem__cCsOt�}x?|jj�D].\}}|�}|dk	r|||<qqW|S(N(uWeakValueDictionaryudatauitemsuNone(uselfunewukeyuwruo((u,/opt/alt/python33/lib64/python3.3/weakref.pyucopybs		uWeakValueDictionary.copycCskddlm}|j�}xH|jj�D]7\}}|�}|dk	r,|||||�<q,q,W|S(Ni(udeepcopy(ucopyudeepcopyu	__class__udatauitemsuNone(uselfumemoudeepcopyunewukeyuwruo((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__deepcopy__ls	u WeakValueDictionary.__deepcopy__cCsKy|j|}Wntk
r)|SYnX|�}|dkrC|S|SdS(N(udatauKeyErroruNone(uselfukeyudefaultuwruo((u,/opt/alt/python33/lib64/python3.3/weakref.pyugetus
		uWeakValueDictionary.getc
csZt|��Hx@|jj�D]/\}}|�}|dk	r||fVqqWWdQXdS(N(u_IterationGuardudatauitemsuNone(uselfukuwruv((u,/opt/alt/python33/lib64/python3.3/weakref.pyuitems�s

	uWeakValueDictionary.itemsc
csNt|��<x4|jj�D]#\}}|�dk	r|VqqWWdQXdS(N(u_IterationGuardudatauitemsuNone(uselfukuwr((u,/opt/alt/python33/lib64/python3.3/weakref.pyukeys�s
uWeakValueDictionary.keysc	cs6t|��$x|jj�D]}|VqWWdQXdS(u�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.

        N(u_IterationGuardudatauvalues(uselfuwr((u,/opt/alt/python33/lib64/python3.3/weakref.pyu
itervaluerefs�s

u!WeakValueDictionary.itervaluerefsc
csNt|��<x4|jj�D]#}|�}|dk	r|VqqWWdQXdS(N(u_IterationGuardudatauvaluesuNone(uselfuwruobj((u,/opt/alt/python33/lib64/python3.3/weakref.pyuvalues�s

	uWeakValueDictionary.valuescCsT|jr|j�nx7|jj�\}}|�}|dk	r||fSqdS(N(u_pending_removalsu_commit_removalsudataupopitemuNone(uselfukeyuwruo((u,/opt/alt/python33/lib64/python3.3/weakref.pyupopitem�s	
	uWeakValueDictionary.popitemcGsx|jr|j�ny|jj|��}Wn#tk
rT|rM|dS�YnX|dkrpt|��n|SdS(Ni(u_pending_removalsu_commit_removalsudataupopuKeyErroruNone(uselfukeyuargsuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyupop�s	

uWeakValueDictionary.popcCsgy|j|}WnHtk
r[|jr7|j�nt||j|�|j|<|SYnX|�SdS(N(udatauKeyErroru_pending_removalsu_commit_removalsuKeyedRefu_remove(uselfukeyudefaultuwr((u,/opt/alt/python33/lib64/python3.3/weakref.pyu
setdefault�s
	
	uWeakValueDictionary.setdefaultcKs�|jr|j�n|j}|dk	r�t|d�sOti�|�}nx6|j�D]%\}}t||j|�||<q\Wnt	|�r�|j
|�ndS(Nuitems(u_pending_removalsu_commit_removalsudatauNoneuhasattrutypeuitemsuKeyedRefu_removeulenuupdate(uselfudictukwargsudukeyuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyuupdate�s	
	 uWeakValueDictionary.updatecCst|jj��S(u~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.

        (ulistudatauvalues(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu	valuerefs�s
uWeakValueDictionary.valuerefsN(u__name__u
__module__u__qualname__u__doc__u__init__u_commit_removalsu__getitem__u__delitem__u__len__u__contains__u__repr__u__setitem__ucopyu__copy__u__deepcopy__uNoneugetuitemsukeysu__iter__u
itervaluerefsuvaluesupopitemupopu
setdefaultuupdateu	valuerefs(u
__locals__((u,/opt/alt/python33/lib64/python3.3/weakref.pyuWeakValueDictionary!s.	
	cs>|EeZdZdZdZdd�Z�fdd�Z�S(uKeyedRefu[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.

    ukeycCs"tj|||�}||_|S(N(urefu__new__ukey(utypeuobucallbackukeyuself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__new__�s	uKeyedRef.__new__cst�j||�dS(N(usuperu__init__(uselfuobucallbackukey(u	__class__(u,/opt/alt/python33/lib64/python3.3/weakref.pyu__init__�suKeyedRef.__init__(ukey(u__name__u
__module__u__qualname__u__doc__u	__slots__u__new__u__init__(u
__locals__((u	__class__u,/opt/alt/python33/lib64/python3.3/weakref.pyuKeyedRef�suKeyedRefcBs|EeZdZdZd(dd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�ZeZ
dd�Zd(dd�Zdd�Zdd�Zdd�ZeZdd�Zdd�Zd d!�Zd"d#�Zd(d$d%�Zd(d&d'�Zd(S()uWeakKeyDictionaryu� 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.
    cCs\i|_t|�dd�}||_g|_t�|_|dk	rX|j|�ndS(NcSsB|�}|dk	r>|jr1|jj|�q>|j|=ndS(N(uNoneu
_iteratingu_pending_removalsuappendudata(ukuselfrefuself((u,/opt/alt/python33/lib64/python3.3/weakref.pyuremoves
		u*WeakKeyDictionary.__init__.<locals>.remove(udataurefu_removeu_pending_removalsusetu
_iteratinguNoneuupdate(uselfudicturemove((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__init__s			uWeakKeyDictionary.__init__cCsI|j}|j}x0|rDy||j�=Wqtk
r@YqXqWdS(N(u_pending_removalsudataupopuKeyError(uselfulud((u,/opt/alt/python33/lib64/python3.3/weakref.pyu_commit_removalss			
u"WeakKeyDictionary._commit_removalscCs|jt|�=dS(N(udatauref(uselfukey((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__delitem__suWeakKeyDictionary.__delitem__cCs|jt|�S(N(udatauref(uselfukey((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__getitem__!suWeakKeyDictionary.__getitem__cCst|j�t|j�S(N(ulenudatau_pending_removals(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__len__$suWeakKeyDictionary.__len__cCsdt|�S(Nu<WeakKeyDictionary at %s>(uid(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__repr__'suWeakKeyDictionary.__repr__cCs||jt||j�<dS(N(udataurefu_remove(uselfukeyuvalue((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__setitem__*suWeakKeyDictionary.__setitem__cCsOt�}x?|jj�D].\}}|�}|dk	r|||<qqW|S(N(uWeakKeyDictionaryudatauitemsuNone(uselfunewukeyuvalueuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyucopy-s		uWeakKeyDictionary.copycCskddlm}|j�}xH|jj�D]7\}}|�}|dk	r,|||�||<q,q,W|S(Ni(udeepcopy(ucopyudeepcopyu	__class__udatauitemsuNone(uselfumemoudeepcopyunewukeyuvalueuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__deepcopy__7s	uWeakKeyDictionary.__deepcopy__cCs|jjt|�|�S(N(udataugeturef(uselfukeyudefault((u,/opt/alt/python33/lib64/python3.3/weakref.pyuget@suWeakKeyDictionary.getcCs6yt|�}Wntk
r(dSYnX||jkS(NF(urefu	TypeErroruFalseudata(uselfukeyuwr((u,/opt/alt/python33/lib64/python3.3/weakref.pyu__contains__Cs

	uWeakKeyDictionary.__contains__c
csZt|��Hx@|jj�D]/\}}|�}|dk	r||fVqqWWdQXdS(N(u_IterationGuardudatauitemsuNone(uselfuwruvalueukey((u,/opt/alt/python33/lib64/python3.3/weakref.pyuitemsJs

	uWeakKeyDictionary.itemsc
csHt|��6x.|jD]#}|�}|dk	r|VqqWWdQXdS(N(u_IterationGuardudatauNone(uselfuwruobj((u,/opt/alt/python33/lib64/python3.3/weakref.pyukeysQs

	uWeakKeyDictionary.keysc
csNt|��<x4|jj�D]#\}}|�dk	r|VqqWWdQXdS(N(u_IterationGuardudatauitemsuNone(uselfuwruvalue((u,/opt/alt/python33/lib64/python3.3/weakref.pyuvaluesZs
uWeakKeyDictionary.valuescCs
t|j�S(uzReturn 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.

        (ulistudata(uself((u,/opt/alt/python33/lib64/python3.3/weakref.pyukeyrefs`s
uWeakKeyDictionary.keyrefscCs>x7|jj�\}}|�}|dk	r||fSqdS(N(udataupopitemuNone(uselfukeyuvalueuo((u,/opt/alt/python33/lib64/python3.3/weakref.pyupopitemls
	uWeakKeyDictionary.popitemcGs|jjt|�|�S(N(udataupopuref(uselfukeyuargs((u,/opt/alt/python33/lib64/python3.3/weakref.pyupopssuWeakKeyDictionary.popcCs|jjt||j�|�S(N(udatau
setdefaulturefu_remove(uselfukeyudefault((u,/opt/alt/python33/lib64/python3.3/weakref.pyu
setdefaultvsuWeakKeyDictionary.setdefaultcKs�|j}|dk	rot|d�s9ti�|�}nx3|j�D]"\}}||t||j�<qFWnt|�r�|j|�ndS(Nuitems(	udatauNoneuhasattrutypeuitemsurefu_removeulenuupdate(uselfudictukwargsudukeyuvalue((u,/opt/alt/python33/lib64/python3.3/weakref.pyuupdateys	uWeakKeyDictionary.updateN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u_commit_removalsu__delitem__u__getitem__u__len__u__repr__u__setitem__ucopyu__copy__u__deepcopy__ugetu__contains__uitemsukeysu__iter__uvaluesukeyrefsupopitemupopu
setdefaultuupdate(u
__locals__((u,/opt/alt/python33/lib64/python3.3/weakref.pyuWeakKeyDictionary�s,	
	(u__doc__u_weakrefugetweakrefcountugetweakrefsurefuproxyuCallableProxyTypeu	ProxyTypeu
ReferenceTypeu_weakrefsetuWeakSetu_IterationGuarducollectionsu
ProxyTypesu__all__uMutableMappinguWeakValueDictionaryuKeyedRefuWeakKeyDictionary(((u,/opt/alt/python33/lib64/python3.3/weakref.pyu<module>s4				�

Zerion Mini Shell 1.0