ok
Direktori : /proc/thread-self/root/opt/alt/python37/lib64/python3.7/__pycache__/ |
Current File : //proc/thread-self/root/opt/alt/python37/lib64/python3.7/__pycache__/functools.cpython-37.pyc |
B � f�� � @ s� d Z ddddddddd d dgZydd lmZ W n ek rB Y nX ddlmZ ddlmZ ddl m Z ddlmZ dZ dZe efdd�Ze efdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefdd�Zefd d!�Zefd"d#�Zefd$d%�Zefd&d'�Zefd(d)�Zefd*d+�Zefd,d-�Zd.efd/efd0efgd0efd1efd.efgd1efd0efd/efgd/efd.efd1efgd2�Zd3d� Zd4d� Z ydd5lm Z W n ek �r� Y nX G d6d � d �Z!ydd7lm!Z! W n ek �r� Y nX G d8d � d e"�Z#ed9d:d;d<d=g�Z$G d>d?� d?e%�Z&e"� fe'e(he)e*e+fd@dA�Z,dRdDd�Z-dEdF� Z.yddGlm.Z. W n ek �rr Y nX dHdI� Z/dSdKdL�Z0dMdN� Z1dOdP� Z2dQd� Z3dJS )TzEfunctools.py - Tools for working with functions and callable objects �update_wrapper�wraps�WRAPPER_ASSIGNMENTS�WRAPPER_UPDATES�total_ordering� cmp_to_key� lru_cache�reduce�partial� partialmethod�singledispatch� )r )�get_cache_token)� namedtuple)�recursive_repr)�RLock)� __module__�__name__�__qualname__�__doc__�__annotations__)�__dict__c C sn x<|D ]4}yt ||�}W n tk r, Y qX t| ||� qW x$|D ]}t | |��t ||i �� qDW || _| S )a Update a wrapper function to look like the wrapped function wrapper is the function to be updated wrapped is the original function assigned is a tuple naming the attributes assigned directly from the wrapped function to the wrapper function (defaults to functools.WRAPPER_ASSIGNMENTS) updated is a tuple naming the attributes of the wrapper that are updated with the corresponding attribute from the wrapped function (defaults to functools.WRAPPER_UPDATES) )�getattr�AttributeError�setattr�update�__wrapped__)�wrapper�wrapped�assigned�updated�attr�value� r"