Your IP : 3.147.67.224


Current Path : /proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/_threading_local.cpython-37.opt-2.pyc

B

YI~d.�@sZddlmZddlmZdgZGdd�d�Zedd��ZGdd�d�Zdd	lm	Z	m
Z
d
S)�)�ref)�contextmanager�localc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�
_localimpl)�key�dicts�	localargs�	locallock�__weakref__cCsdtt|��|_i|_dS)Nz_threading_local._localimpl.)�str�idrr)�self�r�5/opt/alt/python37/lib64/python3.7/_threading_local.py�__init__�sz_localimpl.__init__cCst�}|jt|�dS)N�)�current_threadrr)r
�threadrrr�get_dict�sz_localimpl.get_dictcshi}|j}t�}t|�}|f�fdd�	}|f�fdd�	}t||��t||���|j|<�|f|j|<|S)Ncs��}|dk	r|j|=dS)N)�__dict__)�_rr)�wrthreadrr�
local_deleted�sz-_localimpl.create_dict.<locals>.local_deletedcs��}|dk	r|j�|�}dS)N)r�pop)r�idtr�dct)�wrlocalrr�thread_deleted�sz._localimpl.create_dict.<locals>.thread_deleted)rrrrrr)r
Z	localdictrrrrrr)rrr�create_dict�s


z_localimpl.create_dictN)�__name__�
__module__�__qualname__�	__slots__rrrrrrrr�src	csvt�|d�}y|��}Wn2tk
rJ|��}|j\}}|j||�YnX|j�t�|d|�dVWdQRXdS)N�_local__implr)	�object�__getattribute__r�KeyErrorrrrr	�__setattr__)r
�implr�args�kwrrr�_patch�s
r+c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r)r#rcOsX|s|r|jtjkrtd��t�|�}t�}||f|_t�|_t�|d|�|�	�|S)Nz*Initialization arguments are not supportedr#)
rr$�	TypeError�__new__rr�RLockr	r'r)�clsr)r*r
r(rrrr-�s

z
local.__new__c	Cs t|��t�||�SQRXdS)N)r+r$r%)r
�namerrrr%�s
zlocal.__getattribute__c	Cs:|dkrtd|jj��t|��t�|||�SQRXdS)Nrz+%r object attribute '__dict__' is read-only)�AttributeError�	__class__rr+r$r')r
r0�valuerrrr'�s
zlocal.__setattr__c	Cs8|dkrtd|jj��t|��t�||�SQRXdS)Nrz+%r object attribute '__dict__' is read-only)r1r2rr+r$�__delattr__)r
r0rrrr4�s
zlocal.__delattr__N)rr r!r"r-r%r'r4rrrrr�s
)rr.N)�weakrefr�
contextlibr�__all__rr+rZ	threadingrr.rrrr�<module>�s,&

?>