← Back
Editing: __init__.cpython-311.pyc
� %�cd � � � d dl Z d� Zefd�ZdS )� Nc �H � � � fd�} 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 �L �� t �d� � s �| i |���_ �j S )N�always_returns)�hasattrr )�args�kwargs�funcs ��7/usr/lib/python3/dist-packages/keyring/util/__init__.py�wrapperzonce.<locals>.wrapper s6 �� ��t�-�.�.� 8�"&�$��"7��"7�"7�D���"�"� )� functools�wraps)r r s ` r �oncer s8 �� � #� #� #� #� #� !�9�?�4� � ��)�)�)r c # �D K � | D ]} |� � V � �# |$ r Y �w xY wdS )zk yield the results of calling each element of callables, suppressing any indicated exceptions. N� )� callables� exceptions�callables r �suppress_exceptionsr s[ � � � � � � �� ��(�*�*������� � � ��D� ����� s ���)r r � Exceptionr r r r �<module>r sC �� � � � �*� *� *�0 /8� � � � � � r
Save File
Cancel