a
    ì¢ƒ[Ó  ã                   @   sV   d dl mZmZmZ d dlZ[[[dd„ Zdd„ Zejd  dkrJdd	„ Znd
d	„ ZdS )é    )Úabsolute_importÚprint_functionÚunicode_literalsNc                    sD   ddl m‰  tˆƒ‰‡ ‡‡fdd„tˆ ƒD ƒ}| |¡ t| ¡ ƒS )zñCalled by the constant modules to load up the constants from the C
    library starting with PREFIX.  Matching constants will be inserted
    into SCOPE with PREFIX stripped from the names.  Returns the names
    of inserted constants.

    é   )Úgpgmec                    s*   i | ]"}|  ˆ¡r|ˆd … tˆ |ƒ“qS ©N)Ú
startswithÚgetattr)Ú.0Z
identifier©r   ÚindexÚprefix© ú*/usr/lib/python3/dist-packages/gpg/util.pyÚ
<dictcomp>#   s   ÿz%process_constants.<locals>.<dictcomp>)Ú r   ÚlenÚdirÚupdateÚlistÚkeys)r   ZscopeZ	constantsr   r   r   Úprocess_constants   s    þ
r   c                 C   s   d  dd„ | D ƒ¡S )Nr   c                 s   sD   | ]<}|d ks*|dks*|dks*t |ƒdkr8d t |ƒ¡n|V  qdS )ú+ú"ú%é    z%{0:2x}N)ÚordÚformat)r
   Úcr   r   r   Ú	<genexpr>,   s   ÿÿÿÿ
ÿz!percent_escape.<locals>.<genexpr>)Újoin)Úsr   r   r   Úpercent_escape+   s    
þr"   é   c                 C   s
   t | tƒS r   )Ú
isinstanceÚstr©Úxr   r   r   Úis_a_string4   s    r(   c                 C   s
   t | tƒS r   )r$   Z
basestringr&   r   r   r   r(   8   s    )	Z
__future__r   r   r   Úsysr   r"   Úversion_infor(   r   r   r   r   Ú<module>   s   
