%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/__pycache__/string.cpython-312.pyc

�

���f
.����dZgd�ZddlZdZdZdZeezZdZedzd	zZd
Z	dZ
eeze
zezZdd�Zddl
Zdd
lmZiZGd�d�Zej)�Gd�d�Zy)anA collection of string constants.

Public module variables:

whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a string containing all ASCII decimal digits
hexdigits -- a string containing all ASCII hexadecimal digits
octdigits -- a string containing all ASCII octal digits
punctuation -- a string containing all ASCII punctuation characters
printable -- a string containing all ASCII characters considered printable

)�
ascii_letters�ascii_lowercase�ascii_uppercase�capwords�digits�	hexdigits�	octdigits�	printable�punctuation�
whitespace�	Formatter�Template�Nz 	

�abcdefghijklmnopqrstuvwxyz�ABCDEFGHIJKLMNOPQRSTUVWXYZ�
0123456789�abcdef�ABCDEF�01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~c�z�|xsdjttj|j	|���S)a�capwords(s [,sep]) -> string

    Split the argument into words using split, capitalize each
    word using capitalize, and join the capitalized words using
    join.  If the optional second argument sep is absent or None,
    runs of whitespace characters are replaced by a single space
    and leading and trailing whitespace are removed, otherwise
    sep is used to split and join the words.

    � )�join�map�str�
capitalize�split)�s�seps  �/usr/lib/python3.12/string.pyrr%s,��
�J�3���S���������>�?�?�)�ChainMapc�r��eZdZdZdZdZdZejZ	�fd�Z
d�Zd�Ze
fd�Ze
fd	�Zd
�Zd�Z�xZS)r
z.A string class for supporting $-substitutions.�$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�"�"�		"�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�"�"�	"��
r)�__name__�
__module__�__qualname__�__doc__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)r8rprqrr�	used_args�result�_s       rrozFormatter.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_fieldrw�format_fieldr)r8rprqrrry�recursion_depthr}rz�literal_text�
field_name�format_spec�
conversion�obj�arg_useds              rrwzFormatter._vformat�sQ���Q���<�=�=����
�
�=�)�,	C�=�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�Y,	C�\�w�w�v���.�.rc�6�t|t�r||S||Sr6)�
isinstance�int)r8�keyrqrrs    r�	get_valuezFormatter.get_value�s ���c�3����9���#�;�rc��yr6�)r8ryrqrrs    rrxzFormatter.check_unused_argss��rc��t||�Sr6)rs)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�asciirCrs)r8r�r�s   rr�zFormatter.convert_fieldsZ�����L�
�3�
��u�:��
�3�
���;��
�3�
���<���=�D�D�Z�P�Q�Qrc�,�tj|�Sr6)�_string�formatter_parser)r8rps  rr~zFormatter.parses���'�'�
�6�6rc��tj|�\}}|j|||�}|D]\}}|r
t||�}�||}�||fSr6)r��formatter_field_name_splitr��getattr)	r8r�rqrr�first�restr��is_attrrEs	         rr�zFormatter.get_field(s`���8�8��D���t��n�n�U�D�&�1���	�J�G�Q���c�1�o���!�f��		��E�z�rN)r)rgrhrirsrorwr�rxr�r�r~r�r�rrrr�s6��9��!"�3/�l�
�*�
R�(7�
rrr6)rj�__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

Zerion Mini Shell 1.0