Current File : //proc/self/root/lib/python3/dist-packages/botocore/__pycache__/hooks.cpython-312.pyc |
�
P��e�a � �� � d dl Z d dlZd dlmZmZ d dlmZ d dlmZ ej e
� Z edg d�� Zd Z
dZdZ G d � de� Zdd
�Z G d� d� Z G d
� de� Z G d� de� Z G d� d� Zy)� N)�deque�
namedtuple)�accepts_kwargs)�
EVENT_ALIASES�NodeList)�first�middle�last� � c � � e Zd Zd� Zy)r c �� � t j | j � }t j | j � }t j | j � }t |||� }|S �N)�copyr r r
r )�self�
first_copy�middle_copy� last_copy�copieds �0/usr/lib/python3/dist-packages/botocore/hooks.py�__copy__zNodeList.__copy__ sK � ��Y�Y�t�z�z�*�
��i�i����,���I�I�d�i�i�(� ��*�k�9�=���
� N)�__name__�
__module__�__qualname__r � r r r r s � �r c �, � | D ] }|d �� |d c S |S )a Find first non None response in a list of tuples.
This function can be used to find the first non None response from
handlers connected to an event. This is useful if you are interested
in the returned responses from event handlers. Example usage::
print(first_non_none_response([(func1, None), (func2, 'foo'),
(func3, 'bar')]))
# This will print 'foo'
:type responses: list of tuples
:param responses: The responses from the ``EventHooks.emit`` method.
This is a list of tuples, and each tuple is
(handler, handler_response).
:param default: If no non-None responses are found, then this default
value will be returned.
:return: The first non-None response in the list of tuples.
r r )� responses�default�responses r �first_non_none_responser! &