ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/string.cpython-311.opt-1.pyc

�

�f
.����dZgd�ZddlZdZdZdZeezZdZedzd	zZd
Z	dZ
eeze
zezZdd�Zddl
Zdd
lmZiZGd�d��Ze���Gd�d��ZdS)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��|pd�ttj|�|������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  �-/opt/alt/python311/lib64/python3.11/string.pyrr%s2��
�J�3���S���������>�>�?�?�?�)�ChainMapc�h��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	�<��t�����d|jvr|j}n=t	j|j��}|j}|jp|j}d|�d|�d|�d|�d�	}t	j	||j
tjz��|_dS)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�G�G��J�s�}�-�-�E���B��$�5��
�C��
��� ������ �	���G��k�'�3�9�s�{�+B�C�C����rc��||_dS�N)�template)�selfr7s  r�__init__zTemplate.__init__Ws
�� ��
�
�
rc� �|�d��}|jd|��d���}|sd}d}n<|td�|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�b�!�,�,�d�,�;�;���	 ��E��F�F���B�G�G�E�#�2�#�J�/�/�0�0�0�E���Z�Z�F��I� �%��)�*�*�	*rc�����tur|�n|rt|������fd�}�j�|�j��S)Nc�<��|�d��p|�d��}|�t�|��S|�d����jS|�d�����|��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.substitutehsg�����n�$�$��G�G�
�	.���W�-�-�G�
	+�
	+�
	+�
	+�
	+�
	+��|������7�7�7rc�����tur|�n|rt|������fd�}�j�|�j��S)Nc���|�d��p|�d��}|�:	t�|��S#t$r|���cYSwxYw|�d����jS|�d���|���St	d�j���rL)rQr�KeyErrorr*rCr$rRs  ��rrTz)Template.safe_substitute.<locals>.convert�s�����H�H�W�%�%�;����(�);�);�E�� �&��w�u�~�.�.�.���&�&�&��8�8�:�:�%�%�%�&�����x�x�	�"�"�.��~�%��x�x�	�"�"�.��x�x�z�z�!��B�!�\�+�+�
+s�A�A%�$A%rUrYs``  r�safe_substitutezTemplate.safe_substitute{sg�����n�$�$��G�G�
�	.���W�-�-�G�	+�	+�	+�	+�	+�	+��|������7�7�7rc�"�|j�|j��D]n}|�d���dS|�d���?|�d���*|�d���t	d|j����odS)Nr;FrMrNrOrPT)r$�finditerr7rQrC)r8rDs  r�is_validzTemplate.is_valid�s����,�'�'��
�6�6�		"�		"�B��x�x�	�"�"�.��u�u�����!�!�)��H�H�X�&�&�.��H�H�Y�'�'�/�!�!F��L�"�"�"���trc�\�g}|j�|j��D]�}|�d��p|�d��}|�||vr|�|���H|�?|�d���*|�d���td|j�����|S)NrMrNr;rOrP)r$rar7rQ�appendrC)r8�idsrDrMs    r�get_identifierszTemplate.get_identifiers�s������,�'�'��
�6�6�	"�	"�B��H�H�W�%�%�;����(�);�);�E�� �U�#�%5�%5��
�
�5�!�!�!�!��-��H�H�Y�'�'�/��H�H�Y�'�'�/�!�!F��L�"�"�"���
r)�__name__�
__module__�__qualname__�__doc__r*r+r,r(�
IGNORECASEr.r&r9rIrVr[r_rbrf�
__classcell__)r4s@rr
r
9s��������8�8��I�
)�I��N��N�E�D�D�D�D�D�$!�!�!�

*�
*�
*�"0�8�8�8�8�&'5�8�8�8�8�*���������rr
c�H�eZdZd�Zd�Z	dd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�ZdS)
rc�0�|�|||��Sr6)�vformat)r8�
format_string�args�kwargss    r�formatzFormatter.format�s���|�|�M�4��8�8�8rc��t��}|�||||d��\}}|�|||��|S)N�)�set�_vformat�check_unused_args)r8rprqrr�	used_args�result�_s       rrozFormatter.vformat�sE���E�E�	��M�M�-��v�y�!�L�L�	������y�$��7�7�7��
rrc	��|dkrtd���g}|�|��D�]\}}	}
}|r|�|��|	��|	dkr(|durtd���t|��}	|dz
}n'|	���r|rtd���d}|�|	||��\}}
|�|
��|�||��}|�|
||||dz
|���\}
}|�|�	||
������d�
|��|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�s����Q����<�=�=�=����
�
�=�)�)�,	C�,	C�=�L�*�k�:��
,��
�
�l�+�+�+��%�
��#�#�%��.�.�(�*5�6�6�6�"%�^�!4�!4�J�"�a�'�N�N��'�'�)�)�+�%�6�(�*5�6�6�6�
&+�N�!%���z�4�� H� H�
��X��
�
�h�'�'�'��(�(��j�9�9��/3�m�m���v���q�0�#1�/<�/3�/3�+��^��
�
�d�/�/��[�A�A�B�B�B���w�w�v����.�.rc�L�t|t��r||S||Sr6)�
isinstance�int)r8�keyrqrrs    r�	get_valuezFormatter.get_value�s(���c�3���	���9���#�;�rc��dSr6�)r8ryrqrrs    rrxzFormatter.check_unused_argss���rc�"�t||��Sr6)rs)r8�valuer�s   rr�zFormatter.format_fields���e�[�)�)�)rc���|�|S|dkrt|��S|dkrt|��S|dkrt|��Std�|�����)Nr�r�az"Unknown conversion specifier {0!s})r�repr�asciirCrs)r8r�r�s   rr�zFormatter.convert_fieldso�����L�
�3�
�
��u�:�:��
�3�
�
���;�;��
�3�
�
���<�<���=�D�D�Z�P�P�Q�Q�Qrc�*�tj|��Sr6)�_string�formatter_parser)r8rps  rr~zFormatter.parses���'�
�6�6�6rc��tj|��\}}|�|||��}|D] \}}|rt||��}�||}�!||fSr6)r��formatter_field_name_splitr��getattr)	r8r�rqrr�first�restr��is_attrrEs	         rr�zFormatter.get_field(sl���8��D�D���t��n�n�U�D�&�1�1���	�	�J�G�Q��
��c�1�o�o����!�f����E�z�rN)r)rgrhrirsrorwr�rxr�r�r~r�r�rrrr�s�������9�9�9����!"�3/�3/�3/�3/�l���
�
�
�*�*�*�
R�
R�
R�(7�7�7�
�
�
�
�
rrr6)rj�__all__r�rrrrrrrr
r	r�rer(�collectionsr rWrVr
r&rr�rr�<module>r�s6���� 2�2�2�������
�.��.���/�1�
�	���X���(�	��	�5���]�"�[�0�:�=�	�
@�@�@�@�����-�-�-�-�-�-���r�r�r�r�r�r�r�r�l	������y�y�y�y�y�y�y�y�y�yr

Zerion Mini Shell 1.0