B b�N]�@s$Gdd�de�ZGdd�de�ZdS)c@s"eZdZdZdd�Zddd�ZdS)�classinstancemethodz� Acts like a class method when called from a class, like an instance method when called by an instance. The method should take two arguments, 'self' and 'cls'; one of these will be None depending on how the method was called. cCs||_|j|_dS)N)�func�__doc__)�selfr�r�I/opt/alt/python37/lib/python3.7/site-packages/paste/util/classinstance.py�__init__ szclassinstancemethod.__init__NcCst|j||d�S)N)�obj�type)�_methodwrapperr)rrr rrr�__get__szclassinstancemethod.__get__)N)�__name__� __module__� __qualname__rrr rrrrrsrc@s$eZdZdd�Zdd�Zdd�ZdS)r cCs||_||_||_dS)N)rrr )rrrr rrrrsz_methodwrapper.__init__cOs4|�d�s|�d�rtd��|j|j|jf||�S)Nr�clszAYou cannot use 'self' or 'cls' arguments to a classinstancemethod)Zhas_key�AssertionErrorrrr )r�args�kwrrr�__call__sz_methodwrapper.__call__cCs:|jdkrd|jj|jjfSd|jj|jj|jfSdS)Nz<bound class method %s.%s>z<bound method %s.%s of %r>)rr r r� func_name)rrrr�__repr__ s  z_methodwrapper.__repr__N)r r rrrrrrrrr sr N)�objectrr rrrr�<module>s