ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python38/lib64/python3.8/__pycache__/string.cpython-38.pyc

U

@��d')�@s�dZddddddddd	d
ddgZd
dlZdZdZdZeeZdZeddZdZ	dZ
eee
eZddd�Zd
dl
Zd
dlmZiZGdd�de�ZGdd�ded�ZGdd�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 	

ZabcdefghijklmnopqrstuvwxyzZABCDEFGHIJKLMNOPQRSTUVWXYZ�
0123456789ZabcdefZABCDEFZ01234567z !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~cCs|pd�dd�|�|�D��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.

    � css|]}|��VqdS�N)�
capitalize)�.0�x�r�+/opt/alt/python38/lib64/python3.8/string.py�	<genexpr>0szcapwords.<locals>.<genexpr>)�join�split)�s�seprrrr%s)�ChainMapcs eZdZdZ�fdd�Z�ZS)�_TemplateMetaclassa/
    %(delim)s(?:
      (?P<escaped>%(delim)s) |   # Escape sequence of two delimiters
      (?P<named>%(id)s)      |   # delimiter and a Python identifier
      {(?P<braced>%(bid)s)}  |   # delimiter and a braced identifier
      (?P<invalid>)              # Other ill-formed delimiter exprs
    )
    csbtt|��|||�d|kr$|j}n$tjt�|j�|j|jp@|jd�}t�	||j
tjB�|_dS)N�pattern)Zdelim�idZbid)�superr�__init__r�_re�escape�	delimiter�	idpattern�braceidpattern�compile�flags�VERBOSE)�cls�name�basesZdctr��	__class__rrr Cs

�z_TemplateMetaclass.__init__)�__name__�
__module__�__qualname__rr �
__classcell__rrr,rr9s	rc@sJeZdZdZdZdZdZejZ	dd�Z
dd�Zefd	d
�Z
efdd�ZdS)
rz.A string class for supporting $-substitutions.�$z(?a:[_a-z][_a-z0-9]*)NcCs
||_dSr)�template)�selfr3rrrr \szTemplate.__init__cCsd|�d�}|jd|�jdd�}|s.d}d}n"|td�|dd���}t|�}td||f��dS)N�invalidT)�keepends�����z.Invalid placeholder in string: line %d, col %d)�startr3�
splitlines�lenr�
ValueError)r4�mo�i�lines�colno�linenorrr�_invalidas
�zTemplate._invalidcs:�tkr|�n|rt|�����fdd�}�j�|�j�S)Ncsd|�d�p|�d�}|dk	r(t�|�S|�d�dk	r<�jS|�d�dk	rT��|�td�j��dS�N�namedZbracedZescapedr5z#Unrecognized named group in pattern)�group�strr#rCr=r�r>rE��mappingr4rr�convertss
�z$Template.substitute.<locals>.convert��_sentinel_dict�	_ChainMapr�subr3�r4rJZkwsrKrrIr�
substitutems
zTemplate.substitutecs:�tkr|�n|rt|�����fdd�}�j�|�j�S)Ncs�|�d�p|�d�}|dk	rHzt�|�WStk
rF|��YSX|�d�dk	r\�jS|�d�dk	rr|��Std�j��dSrD)rFrG�KeyErrorr#r=rrHrIrrrK�s�z)Template.safe_substitute.<locals>.convertrLrPrrIr�safe_substitute�s

zTemplate.safe_substitute)r.r/r0�__doc__r#r$r%r!�
IGNORECASEr'r rCrMrQrSrrrrrPs)�	metaclassc@sVeZdZdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)rcOs|�|||�Sr)�vformat)r4�
format_string�args�kwargsrrr�format�szFormatter.formatcCs.t�}|�||||d�\}}|�|||�|S)N�)�set�_vformat�check_unused_args)r4rXrYrZ�	used_args�result�_rrrrW�szFormatter.vformatr
c	Cs�|dkrtd��g}|�|�D]�\}}	}
}|r8|�|�|	dk	r|	dkrj|dkrXtd��t|�}	|d7}n|	��r�|r~td��d}|�|	||�\}}
|�|
�|�||�}|j|
||||d|d�\}
}|�|�	||
��qd�
|�|fS)Nr
zMax string recursion exceededr8FzJcannot switch from manual field specification to automatic field numberingr7)�auto_arg_index)r=�parse�appendrG�isdigit�	get_field�add�
convert_fieldr^�format_fieldr)r4rXrYrZr`Zrecursion_depthrcraZliteral_text�
field_name�format_spec�
conversion�objZarg_usedrrrr^�s<�


�
zFormatter._vformatcCst|t�r||S||SdSr)�
isinstance�int)r4�keyrYrZrrr�	get_value�s
zFormatter.get_valuecCsdSrr)r4r`rYrZrrrr_�szFormatter.check_unused_argscCs
t||�Sr)r[)r4�valuerlrrrrj�szFormatter.format_fieldcCsN|dkr|S|dkrt|�S|dkr,t|�S|dkr<t|�Std�|���dS)Nr�r�az"Unknown conversion specifier {0!s})rG�repr�asciir=r[)r4rsrmrrrri�szFormatter.convert_fieldcCs
t�|�Sr)�_stringZformatter_parser)r4rXrrrrdszFormatter.parsec	CsJt�|�\}}|�|||�}|D] \}}|r8t||�}q ||}q ||fSr)rxZformatter_field_name_splitrr�getattr)	r4rkrYrZ�first�restrnZis_attrr?rrrrg
s
zFormatter.get_fieldN)r
)r.r/r0r[rWr^rrr_rjrirdrgrrrrr�s�
6	)N)rT�__all__rxr
rrrrrrr	rr�rer!�collectionsrrNrM�typerrrrrrr�<module>s6�
Q

Zerion Mini Shell 1.0