%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/persisted/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/persisted/__pycache__/crefutil.cpython-312.pyc

�

Ϫ�f'����dZddlmZmZddlmZGd�d�ZGd�de�ZGd�d	e�ZGd
�de�Z	Gd�d
�Z
Gd�de�Zddlm
Z
Gd�de
ee�Zy)z7
Utility classes for dealing with circular references.
�)�log�reflect)�_constructMethodc�(�eZdZd�Zd�ZdZd�Zd�Zy)�NotKnownc� �g|_d|_y�Nr)�
dependants�resolved��selfs �</usr/lib/python3/dist-packages/twisted/persisted/crefutil.py�__init__zNotKnown.__init__s�������
�c�Z�|jrJ�|jj||f�y�N)rr
�append)r
�
mutableObject�keys   r�addDependantzNotKnown.addDependants&���=�=� � ������
�s�3�4rNc�R�d|_||_|jD]
\}}|||<�y)N�)r�resolvedObjectr
)r
�	newObject�mutrs    r�resolveDependantszNotKnown.resolveDependantss1����
�'������	!�H�C�� �C��H�	!rc��Jd��)Nz(I am not to be used as a dictionary key.�rs r�__hash__zNotKnown.__hash__!s
��<�<�<�qr)�__name__�
__module__�__qualname__rrrrrrrrrrs���5��N�!�=rrc��eZdZdZd�Zd�Zy)�
_ContainerzK
    Helper class to resolve circular references on container objects.
    c��tj|�||_||_t	tt
|���|_tt
|��D]F}t||t�s|jj|��2||j||��H|js+|j|j|j��yy)z�
        @param l: The list of object which may contain some not yet referenced
        objects.

        @param containerType: A type of container objects (e.g., C{tuple} or
            C{set}).
        N)rr�
containerType�l�list�range�len�locs�
isinstance�removerr)r
r'r&�idxs    rrz_Container.__init__*s���	���$��*��������s�1�v��'��	���Q��=�	/�C��a��f�h�/��	�	� � ��%��#��#�#�D�#�.�		/�
�y�y��"�"�4�#5�#5�d�f�f�#=�>�rc���||j|<t|t�sS|jj	|�|js+|j|j
|j��yyy)z�
        Change the value of one contained objects, and resolve references if
        all objects have been referenced.
        N)r'r,rr+r-rr&�r
�n�objs   r�__setitem__z_Container.__setitem__>s[��
����q�	��#�x�(��I�I���Q���9�9��&�&�t�'9�'9�$�&�&�'A�B��)rN)r r!r"�__doc__rr3rrrr$r$%s���?�(	Crr$c��eZdZdZd�Zy)�_Tupleza
    Manage tuple containing circular references. Deprecated: use C{_Container}
    instead.
    c�:�tj||t�y)zi
        @param l: The list of object which may contain some not yet referenced
        objects.
        N)r$r�tuple)r
r's  rrz_Tuple.__init__Ps��
	���D�!�U�+rN)r r!r"r4rrrrr6r6Js���
,rr6c��eZdZd�Zd�Zd�Zy)�_InstanceMethodc�n�tj|�||_||_|j	|d�yr	)rr�my_class�namer)r
�im_name�im_self�im_classs    rrz_InstanceMethod.__init__Ys.�����$�� ��
���	����T�1�%rc��ddl}tjdtj|j
��d|j���tjd|�d|���|jtj��J�)Nrzinstance method �.zbeing called with � )�file)	�	tracebackr�msgr�qualr<r=�print_stack�logfile)r
�args�kwrEs    r�__call__z_InstanceMethod.__call__`se������"�7�<�<��
�
�#>�"?�q�����L�M����$�T�H�A�b�V�4�5����3�;�;��/��qrc��|dk(sJd��t|t�s3t|j|j|�}|j|�yy)Nrzonly zero index allowed)r,rrr<r=r)r
r1r2�methods    rr3z_InstanceMethod.__setitem__hsG���A�v�0�0�0�v��#�x�(�%�d�m�m�T�Y�Y��D�F��"�"�6�*�)rN)r r!r"rrLr3rrrr:r:Xs��&��+rr:c��eZdZd�Zd�Zy)�_DictKeyAndValuec��||_yr)�dict)r
rRs  rrz_DictKeyAndValue.__init__ps	����	rc��|dvrtd��|r||_n||_t|d�r1t|d�r$|j|j|j<yyy)N)rrz6DictKeyAndValue should only ever be called with 0 or 1r�value)�RuntimeErrorrTr�hasattrrRr0s   rr3z_DictKeyAndValue.__setitem__ssW���F�?��W�X�X���D�J��D�H��4���G�D�'�$:�"&�*�*�D�I�I�d�h�h��%;�rN)r r!r"rr3rrrrPrPos���-rrPc��eZdZd�Zy)�_Dereferencec�<�tj|�||_yr)rr�id)r
rZs  rrz_Dereference.__init__s�����$����rN)r r!r"rrrrrXrX~s��rrX)�Deferredc�"�eZdZd�ZdZd�Zd�Zy)�_Deferc�x�tj|�tj|�|j�yr)r[rr�pausers rrz_Defer.__init__�s'�����$�����$���
�
�rrc��|jrtdj||���d|_|j|�y)Nz8setitem should only be called once, setting {!r} to {!r}r)�wassetrU�format�callbackr0s   rr3z_Defer.__setitem__�s>���;�;��J�Q�Q��s���
��D�K��
�
�c�rc��tj|||�|j�|j}|j	|�yr)rr�unpause�resultr)r
�depr�resovds    rrz_Defer.addDependant�s6��	���d�C��-������������v�&rN)r r!r"rrar3rrrrr]r]�s���
�F�	�'rr]N)r4�twisted.pythonrr�twisted.python.compatrrr$r6r:rPrX�twisted.internet.deferr[�objectr]rrr�<module>rmsq���
(�2�=�=�*"C��"C�J,�Z�,�+�h�+�.-�-��8��,�'�X�f�
�x�'r

Zerion Mini Shell 1.0