AlkantarClanX12

Your IP : 18.216.42.122


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/string.cpython-310.opt-2.pyc

o

6��fF)�@s�	gd�ZddlZdZdZdZeeZdZeddZd	Zd
Z	eee	eZ
ddd�ZddlZ
dd
lmZiZGdd�d�Ze��Gdd�d�ZdS))�
ascii_letters�ascii_lowercase�ascii_uppercase�capwords�digits�	hexdigits�	octdigits�	printable�punctuation�
whitespace�	Formatter�Template�Nz 	

ZabcdefghijklmnopqrstuvwxyzZABCDEFGHIJKLMNOPQRSTUVWXYZ�
0123456789ZabcdefZABCDEFZ01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~cCs 	|pd�dd�|�|�D��S)N� css�|]}|��VqdS�N)�
capitalize)�.0�x�r�-/opt/alt/python310/lib64/python3.10/string.py�	<genexpr>0s�zcapwords.<locals>.<genexpr>)�join�split)�s�seprrrr%s
r)�ChainMapcsXeZdZ	dZdZdZejZ�fdd�Z	dd�Z
dd	�Zefd
d�Z
efdd
�Z�ZS)r�$z(?a:[_a-z][_a-z0-9]*)Nc	srt���d|jvr|j}nt�|j�}|j}|jp|j}d|�d|�d|�d|�d�	}t�	||j
tjB�|_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)�clsrZdelim�idZbid��	__class__rrrEs 

����zTemplate.__init_subclass__cCs
||_dSr)�template)�selfr-rrr�__init__W�
zTemplate.__init__cCs`|�d�}|jd|�jdd�}|sd}d}n|td�|dd���}t|�}td||f��)N�invalidT)�keepends�����z.Invalid placeholder in string: line %d, col %d)�startr-�
splitlines�lenr�
ValueError)r.�mo�i�lines�colno�linenorrr�_invalid\s
�zTemplate._invalidc�:�tur|�n|rt|�����fdd�}�j�|�j�S)Ncs`|�d�p	|�d�}|durt�|�S|�d�dur�jS|�d�dur*��|�td�j���N�namedZbracedZescapedr1z#Unrecognized named group in pattern)�group�strr#r?r9r�r:rB��mappingr.rr�convertns
�z$Template.substitute.<locals>.convert��_sentinel_dict�	_ChainMapr�subr-�r.rGZkwsrHrrFr�
substitutehs
zTemplate.substitutecr@)Ncs||�d�p	|�d�}|dur#zt�|�WSty"|��YSw|�d�dur-�jS|�d�dur8|��Std�j��rA)rCrD�KeyErrorr#r9rrErFrrrH�s��z)Template.safe_substitute.<locals>.convertrIrMrrFr�safe_substitute{s

zTemplate.safe_substitute)�__name__�
__module__�__qualname__r#r$r%r!�
IGNORECASEr'rr/r?rJrNrP�
__classcell__rrr+rr9src@sXeZdZdd�Zdd�Z	ddd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)rcOs|�|||�Sr)�vformat)r.�
format_string�args�kwargsrrr�format�szFormatter.formatcCs.t�}|�||||d�\}}|�|||�|S)N�)�set�_vformat�check_unused_args)r.rWrXrY�	used_args�result�_rrrrV�szFormatter.vformatr
c	Cs�|dkrtd��g}|�|�D]^\}}	}
}|r|�|�|	durm|	dkr5|dur,td��t|�}	|d7}n|	��rA|r?td��d}|�|	||�\}}
|�|
�|�||�}|j|
||||d|d�\}
}|�|�	||
��qd�
|�|fS)Nr
zMax string recursion exceededr4FzJcannot switch from manual field specification to automatic field numberingr3)�auto_arg_index)r9�parse�appendrD�isdigit�	get_field�add�
convert_fieldr]�format_fieldr)r.rWrXrYr_Zrecursion_depthrbr`Zliteral_text�
field_name�format_spec�
conversion�objZarg_usedrrrr]�s8�



��zFormatter._vformatcCst|t�r	||S||Sr)�
isinstance�int)r.�keyrXrYrrr�	get_value�s
zFormatter.get_valuecCsdSrr)r.r_rXrYrrrr^�szFormatter.check_unused_argscCs
t||�Sr)rZ)r.�valuerkrrrri�r0zFormatter.format_fieldcCsJ|dur|S|dkrt|�S|dkrt|�S|dkrt|�Std�|���)Nr�r�az"Unknown conversion specifier {0!s})rD�repr�asciir9rZ)r.rrrlrrrrh�szFormatter.convert_fieldcCs
t�|�Sr)�_stringZformatter_parser)r.rWrrrrcr0zFormatter.parsec	CsJt�|�\}}|�|||�}|D]\}}|rt||�}q||}q||fSr)rwZformatter_field_name_splitrq�getattr)	r.rjrXrY�first�restrmZis_attrr;rrrrfs
zFormatter.get_fieldN)r
)rQrRrSrZrVr]rqr^rirhrcrfrrrrr�s
�6	rr)�__all__rwr
rrrrrrr	rr�rer!�collectionsrrKrJrrrrrrr�<module>s&
Y