a
    ,=icK  ã                   @   sZ   d Z ddlmZ ddlmZ ddlmZ dZddd„Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dS )zCOperations for storing and retrieving formatting info on ast nodes.é    )Úabsolute_import)Údivision)Úprint_functionZ	__pasta__Nc                 C   s.   zt | ƒ ||¡W S  ty(   | Y S 0 d S ©N)Ú_formatting_dictÚgetÚAttributeError)ÚnodeÚnameÚdefault© r   úf/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/pasta/base/formatting.pyr      s    r   c                 C   s>   t | tƒs.zt| ti ƒ W n ty,   Y n0 |t| ƒ|< d S r   )ÚhasattrÚ
PASTA_DICTÚsetattrr   r   ©r	   r
   Úvaluer   r   r   Úset   s    
r   c                 C   s   t | |t| |dƒ| ƒ d S ©NÚ ©r   r   r   r   r   r   Úappend(   s    r   c                 C   s   t | ||t| |dƒ ƒ d S r   r   r   r   r   r   Úprepend,   s    r   c                 C   s
   t | tƒS r   )Úgetattrr   )r	   r   r   r   r   0   s    r   )N)Ú__doc__Ú
__future__r   r   r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   
	