
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
U
    SW                     @   s$   G d d de ZG dd de ZdS )c                   @   s&   e Zd ZdddZdd Zdd ZdS )	hybrid_methodNc                 C   s   || _ |p|| _d S N)funcexpr)selfr   r    r   C/opt/alt/python38/lib64/python3.8/site-packages/playhouse/hybrid.py__init__   s    zhybrid_method.__init__c                 C   s&   |d kr| j ||jS | j||S r   )r   __get__	__class__r   r   instanceinstance_typer   r   r   r	      s    zhybrid_method.__get__c                 C   s
   || _ | S r   r   r   r   r   r   r   
expression   s    zhybrid_method.expression)N)__name__
__module____qualname__r   r	   r   r   r   r   r   r      s   
r   c                   @   sF   e Zd ZdddZdd Zdd Zdd	 Zd
d Zdd Zdd Z	dS )hybrid_propertyNc                 C   s    || _ || _|| _|p|| _d S r   )fgetfsetfdelr   )r   r   r   r   r   r   r   r   r      s    zhybrid_property.__init__c                 C   s   |d kr|  |S | |S r   )r   r   r   r   r   r   r	      s    
zhybrid_property.__get__c                 C   s"   | j d krtd|  || d S )NzCannot set attribute.)r   AttributeError)r   r   valuer   r   r   __set__   s    
zhybrid_property.__set__c                 C   s    | j d krtd|  | d S )NzCannot delete attribute.)r   r   )r   r   r   r   r   
__delete__#   s    
zhybrid_property.__delete__c                 C   s
   || _ | S r   )r   )r   r   r   r   r   setter(   s    zhybrid_property.setterc                 C   s
   || _ | S r   )r   )r   r   r   r   r   deleter,   s    zhybrid_property.deleterc                 C   s
   || _ | S r   r   r   r   r   r   r   0   s    zhybrid_property.expression)NNN)
r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r      s   
r   N)objectr   r   r   r   r   r   <module>   s   