+
    üÐjƒ  ã            	       ó*  a € R t0 t R t^ RIHtHt ^ RIHtHtHtH	t	H
t
 ^ RIHtHt ]
! R4      t]
! R4      t]
! R4      tR R ltR	 R
 ltR R ltR R ltR R lt]! ]P,                  ]! ]! ]4      ]! R4      4      4      t] ^ k R R ltR R ltR# )z1
General functional-style helpers for disttrial.
)ÚpartialÚwraps)Ú	AwaitableÚCallableÚIterableÚOptionalÚTypeVar)ÚDeferredÚsucceedÚ_AÚ_BÚ_Cc                óR   € V ^8„  d   QhR\         R\        \         ,          R\         /# )é   ÚdefaultÚoptionalÚreturn)r   r   )Úformats   "Ú@/usr/lib/python3/dist-packages/twisted/trial/_dist/functional.pyÚ__annotate__r      s%   € ÷ 
ñ 
œ"ð 
¬´­ð 
¼ñ 
ó    c                ó   € Vf   V # V# )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.
© )r   r   s   &&r   ÚfromOptionalr      s   € ð ÒØˆØ€Or   c                óŒ   € V ^8„  d   QhR\         \        .\        3,          R\        \        ,          R\        \        ,          /# )r   Ú	conditionÚxsr   )r   r   Úboolr   )r   s   "r   r   r      s4   € ÷ 	ñ 	œ¤2 $¬ *Õ-ð 	´8¼Bµ<ð 	ÄHÌRÅLñ 	r   c              #  óJ   "  € V F  pV ! V4      '       d   Vx € K   R# 	  R# 5i)zz
@return: An iterable over C{xs} that stops when C{condition} returns
    ``False`` based on the value of iterated C{xs}.
Nr   )r   r   Úxs   && r   Ú	takeWhiler       s"   é € ó
 ˆÙ�Q�<Š<ØŒGâó	 ùs   ‚!#c                óh   € V ^8„  d   QhR\         \        ,          R\         \        ,          R\        /# )r   ÚaÚbr   )r   r   r   )r   s   "r   r   r   +   s)   € ÷ ñ ”i¤•mð ¬	´"­ð ¼"ñ r   c              ƒ  ó:   "  € V G Rj  x€L
  VG Rj  x€L
 #  L L5i)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   )r"   r#   s   &&r   Úsequencer%   +   s   é € ð ‡G€GØ�7€Nñ Ùùs   ‚ˆ‰	’“™c                óŒ   € V ^8„  d   QhR\         \        \        .\        3,          R\         \        \        .\        3,          /# ©r   Úfr   )r   r   r   r   )r   s   "r   r   r   6   s4   € ÷ 
ñ 
ŒH”bœ"�Xœr�\Õ"ð 
¤x´´R°¼"°Õ'=ñ 
r   c                ó0   a € \        S 4      V 3R l4       pV# )zW
Create a function like another but with the order of the first two
arguments flipped.
c                 ó   <€ S! W4      # ©Nr   )r#   r"   r(   s   &&€r   ÚgÚflip.<locals>.g<   s   ø€ á�‹wˆr   ©r   )r(   r,   s   f r   Úflipr/   6   s"   ø€ ô ˆ1ƒXôó ðð €Hr   c                ó¨   € V ^8„  d   QhR\         \        .\        3,          R\         \        .\        3,          R\         \        .\        3,          /# )r   ÚfxÚfyr   )r   r   r   r   )r   s   "r   r   r   C   sB   € ÷ ñ ”œ"˜œr˜Õ"ð ¬´"°´r°Õ(:ð ¼xÌÈÌbÈÕ?Qñ r   c                óP   a a€ \        S 4      \        S4      V V3R l4       4       pV# )z}
Create a function that calls one function with an argument and then
another function with the result of the first function.
c                 ó    <€ S! S! V 4      4      # r+   r   )r"   r1   r2   s   &€€r   r,   Úcompose.<locals>.gI   s   ø€ ñ ‘"�Q“%‹yÐr   r.   )r1   r2   r,   s   ff r   Úcomposer6   C   s.   ù€ ô ˆ2ƒYÜ
ˆ2ƒYõó ó ðð €Hr   Nc                ó�   € V ^8„  d   QhR\         \        .\        3,          R\         . \        \        ,          3,          R\        /# )r   Ú	predicateÚactionr   )r   r   r   r   )r   s   "r   r   r   X   s?   € ÷ ñ Üœ˜œd˜
Õ#ðä�Rœ¤2�Ð&Õ'ðô ñr   c              ƒ  óR   "  €  V! 4       G Rj  x€L
 pV ! V4      '       d   K   V#  L5i)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   )r8   r9   Úresults   && r   ÚiterateWhiler<   X   s(   é € ð Ù“x—ˆÙ˜× Ô ØˆMñ  ùs   ‚'Ž%�'£'c                ón   € V ^8„  d   QhR\         \        .\        3,          R\         . \        3,          /# r'   )r   Úintr   )r   s   "r   r   r   k   s.   € ÷ ñ ”Xœs˜e¤R˜iÕ(ð ¬X°b¼"°fÕ-=ñ r   c                ó"   a a€ ^ oR VV 3R llpV# )z†
Wrap a function with another that automatically passes an integer counter
of the number of calls that have gone through the wrapper.
c                ó$   € V ^8„  d   QhR\         /# )r   r   )r   )r   s   "r   r   Ú#countingCalls.<locals>.__annotate__r   s   € ÷ ñ Œrñ r   c                  óH   <€  S! S4      p S^,          oV #   S^,          oi ; i)é   r   )r;   Úcounterr(   s    €€r   r,   ÚcountingCalls.<locals>.gr   s,   ø€ ð	Ù�w“ZˆFà�q�LˆGØˆøð �q�L‰Gús   ƒ –!r   )r(   r,   rD   s   f @r   ÚcountingCallsrF   k   s   ù€ ð
 €G÷ñ ð €Hr   c                óˆ   € V ^8„  d   Qh/ ^ \         9   d.   \        \        \        ,          .\        R,          3,          ;R&   # )r   NÚdiscardResult)Ú__conditional_annotations__r   r   r   r	   )r   s   "r   r   r      s8   € ÷ ñ ÷\ò Œxœ¤2�˜¬°$­Ð7Õ8ñ ò]r   )rI   Ú__doc__Ú	functoolsr   r   Útypingr   r   r   r   r   Útwisted.internet.deferr	   r
   r   r   r   r   r    r%   r/   r6   ÚfromCoroutinerH   r<   rF   r   )rI   s   @r   Ú<module>rO      s„   øðö÷ %ß CÕ Cç 4áˆTƒ]€ÙˆTƒ]€ÙˆTƒ]€õ
õ	õõ
õñ <CØ×ÑÙ‰D�‹N™G D›MÓ*ó<€ó õ÷&r   