관리-도구
편집 파일: functools.cpython-36.opt-1.pyc
3 \rz � + @ s� d Z ddddddddd d dgZydd lmZ W n ek rB Y nX ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ yddlmZ W n" ek r� G dd� d�ZY nX dZZd[Zeefdd�Zeefdd�Zefdd�Zefd d!�Zefd"d#�Zefd$d%�Zefd&d'�Zefd(d)�Zefd*d+�Zefd,d-�Zefd.d/�Zefd0d1�Zefd2d3�Z efd4d5�Z!d6efd7efd8efgd8efd9efd6efgd9efd8efd7efgd7efd6e fd9e!fgd:�Z"d;d� Z#d<d� Z$ydd=lm$Z$ W n ek �r� Y nX G d>d � d �Z%ydd?lm%Z% W n ek �r* Y nX G d@d � d e&�Z'edAdBdCdDdEg�Z(G dFdG� dGe)�Z*e&� fe+e,e-e.dH�he/e.e0fdIdJ�Z1d\dMd�Z2dNdO� Z3yddPlm3Z3 W n ek �r� Y nX dQdR� Z4d]dSdT�Z5dUdV� Z6dWdX� Z7dYd� Z8dHS )^zEfunctools.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)�MappingProxyType)�WeakKeyDictionary)�recursive_repr)�RLockc @ s e Zd ZdZdd� Zdd� ZdS )r z/Dummy reentrant lock for builds without threadsc C s d S )N� )�selfr r �!/usr/lib64/python3.6/functools.py� __enter__ s zRLock.__enter__c C s d S )Nr )r �exctype�excinst�exctbr r r �__exit__ s zRLock.__exit__N)�__name__� __module__�__qualname__�__doc__r r r r r r r s r r r r r �__annotations__�__dict__c C sn x<|D ]4}yt ||�}W n tk r, Y qX t| ||� qW x$|D ]}t | |�jt ||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�valuer r r r , s c C s t t| ||d�S )a� Decorator factory to apply update_wrapper() to a wrapper function Returns a decorator that invokes update_wrapper() with the decorated function as the wrapper argument and the arguments to wraps() as the remaining arguments. Default arguments are as for update_wrapper(). This is a convenience function to simplify applying partial() to update_wrapper(). )r'