File: //proc/1233/cwd/lib/python3/dist-packages/gpg/__pycache__/util.cpython-310.pyc
o
좃[� � @ sX d dl mZmZmZ d dlZ[[[dd� Zdd� Zejd dkr&dd � ZdS d
d � ZdS )� )�absolute_import�print_function�unicode_literalsNc sD ddl m� t���� ��fdd�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� |��qS �N)�
startswith�getattr)�.0�
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 �scope� constantsr r r �process_constants s �
r c C s d� dd� | D ��S )Nr c s sF � | ]}|d ks|dks|dkst |�dkrd�t |��n|V qdS )�+�"�%� 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 �
t | t�S r )�
isinstance�str��xr r r �is_a_string4 �
r, c C r'