Your IP : 52.14.26.141
o
6��fc � @ sT d Z ddlZddddddd d
ddd
�
Zdd� Zdd� Zdd� Zedkr(e� dS dS )z<Safely evaluate Python string literals without using eval().� N����
�
� ��'�"�\)
�a�b�f�n�r�t�vr r
r c C s� | � dd�\}}|�d�sJ �t�|�}|d ur|S |�d�rJ|dd � }t|�dk r1td| ��z
t|d�}W t|�S tyI td| �d �w z
t|d�}W t|�S tyb td | �d �w )
Nr � r �x� z!invalid hex string escape ('\%s')� � z#invalid octal string escape ('\%s'))�group�
startswith�simple_escapes�get�len�
ValueError�int�chr)�m�all�tailZescZhexes�i� r$ �=/opt/alt/python310/lib64/python3.10/lib2to3/pgen2/literals.py�escape s*
����r&