File: //home/arjun/projects/env/lib/python3.10/site-packages/tornado/__pycache__/util.cpython-310.pyc
o
wey? � @ s� d Z ddlZddlZddlZddlmZ ddlZddlZddlZddl Z ddlm
Z
mZmZm
Z
mZmZmZmZmZmZ ejrSddlZddlmZ ddlmZ ddlZeZeZeZzddlm Z W n e!yx deg e"f fd d
�Z#e#� Z Y nw ej$Z$G dd� deee
f �Z%G d
d� de&�Z'dede
fdd�Z( d7de
deee
f deee
ee
f ddfdd�Z)deee* ee+ ed f dej,fdd�Z-de+dee. fdd�Z/e0d�Z1dee defd d!�Z2e�3d"ej4�Z5d#edefd$d%�Z6G d&d'� d'e&�Z7G d(d)� d)e&�Z8d*d+� Z9d,ed-edefd.d/�Z:ej;�<d0��s"ej;�<d1�d2k�r%e:Z=nzdd3l>m?Z= W n e!�yC ej;�<d1�d4k�r?� e:Z=Y nw d5d6� Z@dS )8a� Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` class
and its `~Configurable.configure` method, which becomes a part of the
interface of its subclasses, including `.AsyncHTTPClient`, `.IOLoop`,
and `.Resolver`.
� N)�getfullargspec)
�Any�Optional�Dict�Mapping�List�Tuple�Match�Callable�Type�Sequence)�
TracebackType)�Union��
is_finalizing�returnc s, g � t �� fdd�� dtf� fdd�} | S )Nc s
� � d �S �N)�append� ��Lr �E/home/arjun/projects/env/lib/python3.10/site-packages/tornado/util.py�<lambda>8 s
z-_get_emulated_is_finalizing.<locals>.<lambda>r c s � g kS r r r r r r r : s z2_get_emulated_is_finalizing.<locals>.is_finalizing)�atexit�register�boolr r r r �_get_emulated_is_finalizing6 s r c @ s8 e Zd ZdZdedefdd�Zdededdfdd �ZdS )
�
ObjectDictzFMakes a dictionary behave like an object, with attribute-style access.�namer c C s"