Your IP : 3.15.3.17


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/string.cpython-312.opt-2.pyc

�

�Q�f
.����	gd�ZddlZdZdZdZeezZdZedzdzZd	Zd
Z	eeze	zezZ
dd�ZddlZ
ddlmZiZGd
�d�Zej'�Gd�d�Zy))�
ascii_letters�ascii_lowercase�ascii_uppercase�capwords�digits�	hexdigits�	octdigits�	printable�punctuation�
whitespace�	Formatter�Template�Nz 	

�abcdefghijklmnopqrstuvwxyz�ABCDEFGHIJKLMNOPQRSTUVWXYZ�
0123456789�abcdef�ABCDEF�01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~c�|�	|xsdjttj|j	|���S)N� )�join�map�str�
capitalize�split)�s�seps  �-/opt/alt/python312/lib64/python3.12/string.pyrr%s1��	�
�J�3���S���������>�?�?�)�ChainMapc�p��eZdZ	dZdZdZejZ�fd�Z	d�Z
d�Zefd�Z
efd�Zd	�Zd
�Z�xZS)r
�$z(?a:[_a-z][_a-z0-9]*)Nc	�l��t�|��d|jvr
|j}nTt	j
|j�}|j}|jxs|j}d|�d|�d|�d|�d�	}t	j||jtjz�|_y)N�patternz
            z(?:
              (?P<escaped>zC)  |   # Escape sequence of two delimiters
              (?P<named>zJ)       |   # delimiter and a Python identifier
              {(?P<braced>z�)} |   # delimiter and a braced identifier
              (?P<invalid>)             # Other ill-formed delimiter exprs
            )
            )�super�__init_subclass__�__dict__r$�_re�escape�	delimiter�	idpattern�braceidpattern�compile�flags�VERBOSE)�clsr$�delim�id�bid�	__class__s     �rr&zTemplate.__init_subclass__Es����
��!�#�����$��k�k�G��J�J�s�}�}�-�E����B��$�$�5��
�
�C�
�
�G�� �'�"�����5�!
�	�G��k�k�'�3�9�9�s�{�{�+B�C��rc��||_y�N)�template)�selfr7s  r�__init__zTemplate.__init__Ws	�� ��
rc���|jd�}|jd|jd��}|sd}d}n+|tdj	|dd��z
}t|�}td||fz��)N�invalidT)�keepends�����z.Invalid placeholder in string: line %d, col %d)�startr7�
splitlines�lenr�
ValueError)r8�mo�i�lines�colno�linenos      r�_invalidzTemplate._invalid\s~���H�H�Y����
�
�b�q�!�,�,�d�,�;����E��F���B�G�G�E�#�2�J�/�0�0�E���Z�F��I� �%��)�*�	*rc�����tur|�n|rt|�����fd�}�jj|�j�S)Nc���|jd�xs|jd�}|�t�|�S|jd���jS|jd���j|�t	d�j
���N�named�braced�escapedr;�#Unrecognized named group in pattern)�grouprr*rIrCr$�rDrM�mappingr8s  ��r�convertz$Template.substitute.<locals>.convertns����H�H�W�%�;����(�);�E�� ��7�5�>�*�*��x�x�	�"�.��~�~�%��x�x�	�"�.��
�
�b�!��B�!�\�\�+�
+r��_sentinel_dict�	_ChainMapr$�subr7�r8rS�kwsrTs``  r�
substitutezTemplate.substitutehsA����n�$��G�
���W�-�G�
	+��|�|�������7�7rc�����tur|�n|rt|�����fd�}�jj|�j�S)Nc�T��|jd�xs|jd�}|�	t�|�S|jd���jS|jd��|j�St	d�j
��#t$r|j�cYSwxYwrL)rQr�KeyErrorr*rCr$rRs  ��rrTz)Template.safe_substitute.<locals>.convert�s�����H�H�W�%�;����(�);�E�� �&��w�u�~�.�.��x�x�	�"�.��~�~�%��x�x�	�"�.��x�x�z�!��B�!�\�\�+�
+��
 �&��8�8�:�%�&�s�
B�B'�&B'rUrYs``  r�safe_substitutezTemplate.safe_substitute{sA����n�$��G�
���W�-�G�	+��|�|�������7�7rc��|jj|j�D]`}|jd��y|jd���(|jd���:|jd���Lt	d|j��y)Nr;FrMrNrOrPT)r$�finditerr7rQrC)r8rDs  r�is_validzTemplate.is_valid�s|���,�,�'�'��
�
�6�B��x�x�	�"�.������!�)��H�H�X�&�.��H�H�Y�'�/�!�!F��L�L�"�"�7�rc�N�g}|jj|j�D]z}|jd�xs|jd�}|�||vr|j	|��?|��B|jd���T|jd���ftd|j��|S)NrMrNr;rOrP)r$rar7rQ�appendrC)r8�idsrDrMs    r�get_identifierszTemplate.get_identifiers�s������,�,�'�'��
�
�6�B��H�H�W�%�;����(�);�E�� �U�#�%5��
�
�5�!��-��H�H�Y�'�/��H�H�Y�'�/�!�!F��L�L�"�"�7��
r)�__name__�
__module__�__qualname__r*r+r,r(�
IGNORECASEr.r&r9rIrVr[r_rbrf�
__classcell__)r4s@rr
r
9sN���8��I�
)�I��N��N�N�E�D�$!�

*�"0�8�&'5�8�*�rr
c�F�eZdZd�Zd�Z	dd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)rc�(�|j|||�Sr6)�vformat)r8�
format_string�args�kwargss    r�formatzFormatter.format�s���|�|�M�4��8�8rc�p�t�}|j||||d�\}}|j|||�|S)N�)�set�_vformat�check_unused_args)r8rorprq�	used_args�result�_s       rrnzFormatter.vformat�s:���E�	��M�M�-��v�y�!�L�	������y�$��7��
rc	�$�|dkrtd��g}|j|�D]�\}}	}
}|r|j|�|	��|	dk(r |durtd��t|�}	|dz
}n|	j	�r|rtd��d}|j|	||�\}}
|j
|
�|j||�}|j|
||||dz
|��\}
}|j|j||
����dj|�|fS)NrzMax string recursion exceededr>FzJcannot switch from manual field specification to automatic field numberingr=)�auto_arg_index)rC�parserdr�isdigit�	get_field�add�
convert_fieldrv�format_fieldr)r8rorprqrx�recursion_depthr|ry�literal_text�
field_name�format_spec�
conversion�obj�arg_useds              rrvzFormatter._vformat�sL���Q���<�=�=����
�
�=�)�
>�L�*�k�:���
�
�l�+��%�
��#�%��.�(�*5�6�6�"%�^�!4�J�"�a�'�N��'�'�)�%�(�*5�6�6�
&+�N�!%���z�4�� H�
��X��
�
�h�'��(�(��j�9��/3�m�m���v���q�0�#1�/<�/3�+��^��
�
�d�/�/��[�A�B�W*�Z�w�w�v���.�.rc�6�t|t�r||S||Sr6)�
isinstance�int)r8�keyrprqs    r�	get_valuezFormatter.get_value�s ���c�3����9���#�;�rc��yr6�)r8rxrprqs    rrwzFormatter.check_unused_argss��rc��t||�Sr6)rr)r8�valuer�s   rr�zFormatter.format_fields���e�[�)�)rc��|�|S|dk(rt|�S|dk(rt|�S|dk(rt|�Stdj	|���)Nr�r�az"Unknown conversion specifier {0!s})r�repr�asciirCrr)r8r�r�s   rr�zFormatter.convert_fieldsZ�����L�
�3�
��u�:��
�3�
���;��
�3�
���<���=�D�D�Z�P�Q�Qrc�,�tj|�Sr6)�_string�formatter_parser)r8ros  rr}zFormatter.parses���'�'�
�6�6rc��tj|�\}}|j|||�}|D]\}}|r
t||�}�||}�||fSr6)r��formatter_field_name_splitr��getattr)	r8r�rprq�first�restr��is_attrrEs	         rrzFormatter.get_field(s[���8�8��D���t��n�n�U�D�&�1���J�G�Q���c�1�o���!�f��	��E�z�rN)r)rgrhrirrrnrvr�rwr�r�r}rr�rrrr�s6��9��!"�3/�l�
�*�
R�(7�
rrr6)�__all__r�rrrrrrrr
r	r�rer(�collectionsr rWrVr
r&rr�rr�<module>r�s���� 2����
�.��.���/�1�
�	���X���(�	��	�5���]�"�[�0�:�=�	�
@��-���r�r�l	����y�yr

?>