
    ed                         d dl Z d ZefdZy)    Nc                 D      fd} t        j                         |      S )a6  
    Decorate func so it's only ever called the first time.

    This decorator can ensure that an expensive or non-idempotent function
    will not be expensive on subsequent calls and is idempotent.

    >>> func = once(lambda a: a+3)
    >>> func(3)
    6
    >>> func(9)
    6
    >>> func('12')
    6
    c                  N    t        d      s | i |_        j                  S )Nalways_returns)hasattrr   )argskwargsfuncs     7/usr/lib/python3/dist-packages/keyring/util/__init__.pywrapperzonce.<locals>.wrapper   s,    t-."&"7"7D"""    )	functoolswraps)r	   r   s   ` r
   oncer      s      #
 !9??4 ))r   c              #   D   K   | D ]  }	  |         y# |$ r Y w xY ww)zk
    yield the results of calling each element of callables, suppressing
    any indicated exceptions.
    N )	callables
exceptionscallables      r
   suppress_exceptionsr      s7     
  	*  		s    	   )r   r   	Exceptionr   r   r   r
   <module>r      s    *0 /8 	r   