AlkantarClanX12
Current Path : /opt/alt/python311/lib64/python3.11/lib2to3/pgen2/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/lib2to3/pgen2/__pycache__/literals.cpython-311.pyc |
� c��fc � �b � d Z ddlZddddddd d ddd � Zd� Zd� Zd� Zedk r e� � dS dS )z<Safely evaluate Python string literals without using eval().� N���� � � ��'�"�\) �a�b�f�n�r�t�vr r r c � � | � dd� � \ }}|� d� � sJ �t � |� � }|�|S |� d� � rb|dd � }t |� � dk rt d|z � � � t |d� � }nT# t $ r t d|z � � d �w xY w t |d� � }n!# t $ r t d |z � � d �w xY wt |� � S ) 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�tail�esc�hexes�is �=/opt/alt/python311/lib64/python3.11/lib2to3/pgen2/literals.py�escaper) s1 � �����1� � �I�C���>�>�$������ � � �T� "� "�C� ��� ����s��� V��Q�R�R����u�:�:��>�>��A�D�H�I�I�I� T��E�2���A�A��� T� T� T��A�D�H�I�I�t�S� T���� V��D�!���A�A��� V� V� V��C�d�J�K�K�QU�U� V�����q�6�6�Ms �B% �%C�C �C6c � � | � d� � s4| � d� � sJ t | d d� � � � � �| d }| d d� |dz k r|dz }| � |� � s-J t | t |� � d � � � � � �t | � � dt |� � z k sJ �| t |� � t |� � � } t j dt | � � S )Nr r r r � r z)\\(\'|\"|\\|[abfnrtv]|x.{0,2}|[0-7]{1,3}))r �repr�endswithr �re�subr) )�s�qs r( � evalStringr2 ( s� � ��<�<����>����S� 1� 1�>�>�4��"�1�"��;�;�>�>�1� �!��A���!��u��!��|�|� �a�C���:�:�a�=�=�+�+�$�q�#�a�&�&����{�+�+�+�+�=��q�6�6�Q�s�1�v�v�X����� �#�a�&�&�#�a�&�&��.��A� �6�>���J�J�J� c � � t d� � D ]G} t | � � }t |� � }t |� � }||k rt | |||� � �Hd S )N� )�ranger! r, r2 �print)r'