U
    ­‚f—  ã                   @   s*   d dl Z G dd„ deƒZG dd„ dƒZdS )é    Nc                   @   s   e Zd Zdd„ ZdS )ÚClassPropertyc                 C   s   | j  d |¡ƒ S ©N)ÚfgetÚ__get__)ÚselfÚclsÚowner© r	   ú0/tmp/pip-unpacked-wheel-qyyspjli/path/classes.pyr      s    zClassProperty.__get__N)Ú__name__Ú
__module__Ú__qualname__r   r	   r	   r	   r
   r      s   r   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )Úmultimethodz|
    Acts like a classmethod when invoked from the class and like an
    instancemethod when invoked from the instance.
    c                 C   s
   || _ d S r   )Úfunc)r   r   r	   r	   r
   Ú__init__   s    zmultimethod.__init__c                 C   s&   |dkrt  | j|¡S t  | j||¡S )z\
        If called on an instance, pass the instance as the first
        argument.
        N)Ú	functoolsÚpartialr   )r   Úinstancer   r	   r	   r
   r      s    ÿýzmultimethod.__get__N)r   r   r   Ú__doc__r   r   r	   r	   r	   r
   r   	   s   r   )r   Úpropertyr   r   r	   r	   r	   r
   Ú<module>   s   