%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/trial/_dist/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/trial/_dist/__pycache__/functional.cpython-312.pyc

�

Ϫ�f��	��UdZddlmZmZddlmZmZmZmZm	Z	ddl
mZmZe	d�Z
e	d�Ze	d�Zde
d	ee
d
e
fd�Zdee
gefd
ee
d
ee
fd�Zdee
deed
efd�Zdee
egefd
eee
geffd�Zdeegefdee
gefd
ee
geffd�Zeej,eee�ed���Zeee
gedfed<dee
gefdegee
fd
e
fd�Zdeege
fd
ege
ffd�Zy)z1
General functional-style helpers for disttrial.
�)�partial�wraps)�	Awaitable�Callable�Iterable�Optional�TypeVar)�Deferred�succeed�_A�_B�_C�default�optional�returnc��|�|S|S)z�
    Get a definite value from an optional value.

    @param default: The value to return if the optional value is missing.

    @param optional: The optional value to return if it exists.
    �)rrs  �@/usr/lib/python3/dist-packages/twisted/trial/_dist/functional.py�fromOptionalrs�������O��	condition�xsc#�6K�|D]}||�r|���yy�w)z�
    :return: An iterable over C{xs} that stops when C{condition} returns
        ``False`` based on the value of iterated C{xs}.
    Nr)rr�xs   r�	takeWhilers&����
����Q�<��G��	�s��a�bc��:K�|�d{���|�d{���S7�7��w)z�
    Wait for one action to complete and then another.

    If either action fails, failure is propagated.  If the first action fails,
    the second action is not waited on.
    Nr)rrs  r�sequencer+s�����G�G��7�N����s���	����fc�.��t���fd��}|S)zc
    Create a function like another but with the order of the first two
    arguments flipped.
    c����||�S�Nr)rrr s  �r�gzflip.<locals>.g<s�����A�w�r�r)r r$s` r�flipr&6s"����1�X����
�Hr�fx�fyc�N���t��t����fd���}|S)z�
    Create a function that calls one function with an argument and then
    another function with the result of the first function.
    c� ����|��Sr#r)rr'r(s ��rr$zcompose.<locals>.gIs����"�Q�%�y�rr%)r'r(r$s`` r�composer+Cs.����2�Y�
�2�Y�����
�HrN�
discardResult�	predicate�actionc��DK�	|��d{���}||�s|S�7��w)z�
    Call a function repeatedly until its result fails to satisfy a predicate.

    @param predicate: The check to apply.

    @param action: The function to call.

    @return: The result of C{action} which did not satisfy C{predicate}.
    Nr)r-r.�results   r�iterateWhiler1Xs)������x����� ��M���s� �� c�(���d�dtf��fd�}|S)z�
    Wrap a function with another that automatically passes an integer counter
    of the number of calls that have gone through the wrapper.
    rrc�8��	���}�dz
�|S#�dz
�wxYw)N�r)r0�counterr s ��rr$zcountingCalls.<locals>.grs,���	��w�Z�F��q�L�G��
��
�q�L�G�s��)r)r r$r5s` @r�
countingCallsr6ks���
�G��r��
�Hr)�__doc__�	functoolsrr�typingrrrrr	�twisted.internet.deferr
rrr
rr�boolrrr&r+�
fromCoroutiner,�__annotations__r1�intr6rrr�<module>r?s����%�C�C�4��T�]���T�]���T�]��
�"�
����
��
�	��2�$��*�-�	�8�B�<�	�H�R�L�	��i��m��	�"�
��"��

�H�b�"�X�r�\�"�

�x��R��"��'=�

�
��"��r��"�
��"��r��(:�
�x���b��?Q�
�<C�����D��N�G�D�M�*�<�
�x��2����$��7�8������d�
�#���R��2��&�'����&
�X�s�e�R�i�(�
�X�b�"�f�-=�
r

Zerion Mini Shell 1.0