AlkantarClanX12

Your IP : 18.119.122.69


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

o

6��fT��@s�	ddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZgd�Ze
ZdZdZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Ze�ZGdd�d�ZGdd �d e�Z Gd!d"�d"e�Z!Gd#d$�d$e�Z"Gd%d&�d&e�Z#Gd'd(�d(e#�Z$Gd)d*�d*e$�Z%Gd+d,�d,e�Z&Gd-d.�d.e�Z'dS)/�)�MutableMapping)�ChainMapN)�NoSectionError�DuplicateOptionError�DuplicateSectionError�
NoOptionError�InterpolationError�InterpolationDepthError�InterpolationMissingOptionError�InterpolationSyntaxError�ParsingError�MissingSectionHeaderError�ConfigParser�SafeConfigParser�RawConfigParser�
Interpolation�BasicInterpolation�ExtendedInterpolation�LegacyInterpolation�SectionProxy�ConverterMapping�DEFAULTSECT�MAX_INTERPOLATION_DEPTHZDEFAULT�
c@s$eZdZ	ddd�Zdd�ZeZdS)�Error�cCs||_t�||�dS�N)�message�	Exception�__init__)�self�msg�r"�3/opt/alt/python310/lib64/python3.10/configparser.pyr�szError.__init__cC�|jSr)r�r r"r"r#�__repr__��zError.__repr__N)r)�__name__�
__module__�__qualname__rr&�__str__r"r"r"r#r�s

rc@�eZdZ	dd�ZdS)rcCs$t�|d|f�||_|f|_dS)NzNo section: %r)rr�section�args�r r-r"r"r#r�szNoSectionError.__init__N�r(r)r*rr"r"r"r#r��rc@�eZdZ	ddd�ZdS)rNcCs�t|�dg}|dur)dt|�g}|dur|�d�|��|�d�|�|�|}n|�dd�t�|d�|��||_||_	||_
|||f|_dS)N� already exists�While reading from � [line {0:2d}]z
: section rzSection r)�repr�append�format�extend�insertrr�joinr-�source�linenor.)r r-r<r=r!rr"r"r#r�s

zDuplicateSectionError.__init__�NNr0r"r"r"r#r�src@r2)rNcCs�t|�dt|�dg}|dur-dt|�g}|dur |�d�|��|�d�|�|�|}n|�dd�t�|d�|��||_||_	||_
||_||||f|_dS)	Nz in section r3r4r5z	: option rzOption r)
r6r7r8r9r:rrr;r-�optionr<r=r.)r r-r?r<r=r!rr"r"r#r�s"�

zDuplicateOptionError.__init__r>r0r"r"r"r#r�src@r,)rcCs.t�|d||f�||_||_||f|_dS)NzNo option %r in section: %r�rrr?r-r.)r r?r-r"r"r#r�s�zNoOptionError.__init__Nr0r"r"r"r#r�r1rc@r,)rcCs(t�||�||_||_|||f|_dSrr@)r r?r-r!r"r"r#rszInterpolationError.__init__Nr0r"r"r"r#r�r1rc@r,)r
cCs8d�||||�}t�||||�||_||||f|_dS)Nz�Bad value substitution: option {!r} in section {!r} contains an interpolation key {!r} which is not a valid option name. Raw value: {!r})r8rr�	referencer.)r r?r-�rawvalrAr!r"r"r#rs�z(InterpolationMissingOptionError.__init__Nr0r"r"r"r#r
	r1r
c@seZdZdS)rN)r(r)r*r"r"r"r#rsrc@r,)r	cCs0d�||t|�}t�||||�|||f|_dS)Nz�Recursion limit exceeded in value substitution: option {!r} in section {!r} contains an interpolation key which cannot be substituted in {} steps. Raw value: {!r})r8rrrr.)r r?r-rBr!r"r"r#r s��z InterpolationDepthError.__init__Nr0r"r"r"r#r	r1r	c@s:eZdZ	d	dd�Zedd��Zejdd��Zdd�ZdS)
rNcCsP|r|rtd��|s|std��|r|}t�|d|�||_g|_|f|_dS)Nz:Cannot specify both `filename' and `source'. Use `source'.z%Required argument `source' not given.z"Source contains parsing errors: %r)�
ValueErrorrrr<�errorsr.)r r<�filenamer"r"r#r-szParsingError.__init__cCs	tjdtdd�|jS�NzNThe 'filename' attribute will be removed in Python 3.12. Use 'source' instead.���
stacklevel��warnings�warn�DeprecationWarningr<r%r"r"r#rE<s�zParsingError.filenamecCs	tjdtdd�||_dSrFrJ�r �valuer"r"r#rEFs�
cCs*|j�||f�|jd||f7_dS)Nz
	[line %2d]: %s)rDr7r)r r=�liner"r"r#r7PszParsingError.appendr>)r(r)r*r�propertyrE�setterr7r"r"r"r#r*s

	
	rc@r,)r
cCs8t�|d|||f�||_||_||_|||f|_dS)Nz7File contains no section headers.
file: %r, line: %d
%r)rrr<r=rPr.)r rEr=rPr"r"r#rXs��z"MissingSectionHeaderError.__init__Nr0r"r"r"r#r
Ur1r
c@s.eZdZ	dd�Zdd�Zdd�Zdd�Zd	S)
rcC�|Srr")r �parserr-r?rO�defaultsr"r"r#�
before_getl�zInterpolation.before_getcCrSrr"�r rTr-r?rOr"r"r#�
before_setorWzInterpolation.before_setcCrSrr"rXr"r"r#�before_readrrWzInterpolation.before_readcCrSrr"rXr"r"r#�before_writeurWzInterpolation.before_writeN)r(r)r*rVrYrZr[r"r"r"r#risrc@�0eZdZ	e�d�Zdd�Zdd�Zdd�ZdS)	rz
%\(([^)]+)\)sc	C�$g}|�||||||d�d�|�S�N�r��_interpolate_somer;�r rTr-r?rOrU�Lr"r"r#rV��
zBasicInterpolation.before_getcC�<|�dd�}|j�d|�}d|vrtd||�d�f��|S)Nz%%r�%�1invalid interpolation syntax in %r at position %d��replace�_KEYCRE�subrC�find�r rTr-r?rOZ	tmp_valuer"r"r#rY���zBasicInterpolation.before_setc
Csb|j||d|d�}|tkrt|||��|r�|�d�}	|	dkr%|�|�dS|	dkr8|�|d|	��||	d�}|dd�}
|
dkrN|�d�|dd�}n]|
dkr�|j�|�}|durdt||d|��|�|�	d��}||�
�d�}z||}
Wnty�t||||�d�wd|
vr�|�
||||
|||d�n|�|
�n	t||d	|f��|sdSdS)
NT��raw�fallbackrfrr_rG�(�'bad interpolation variable reference %rz/'%%' must be followed by '%%' or '(', found: %r)�getrr	rlr7rj�matchr�optionxform�group�end�KeyErrorr
ra)r rTr?�accum�restr-�map�depthrB�p�c�m�var�vr"r"r#ra�sX


����
����z$BasicInterpolation._interpolate_someN�	r(r)r*�re�compilerjrVrYrar"r"r"r#rys
rc@r\)	rz
\$\{([^}]+)\}c	Cr]r^r`rbr"r"r#rV�rdz ExtendedInterpolation.before_getcCre)Nz$$r�$rgrhrmr"r"r#rY�rnz ExtendedInterpolation.before_setcCs�|j||d|d�}|tkrt|||��|r�|�d�}	|	dkr%|�|�dS|	dkr8|�|d|	��||	d�}|dd�}
|
dkrN|�d�|dd�}n�|
dkr�|j�|�}|durdt||d|��|�d��	d	�}||�
�d�}|}
|}z7t|�dkr�|�|d�}||}n#t|�dkr�|d}
|�|d�}|j|
|dd
�}n	t||d|f��Wnt
ttfy�t|||d	�|��d�wd|vr�|�|||||
t|j|
dd
��|d�n|�|�n	t||d|f��|sdSdS)
NTror�rr_rG�{rs�:)rpzMore than one ':' found: %rz-'$' must be followed by '$' or '{', found: %r)rtrr	rlr7rjrurrw�splitrx�lenrvryrrr
r;ra�dict�items)r rTr?rzr{r-r|r}rBr~rr��pathZsect�optr�r"r"r#ra�st


�
���������z'ExtendedInterpolation._interpolate_someNr�r"r"r"r#r�s
rc@s4eZdZ	e�d�Zdd�Zdd�Zedd��Z	dS)	rz%\(([^)]*)\)s|.c

Cs�|}t}|r@|d8}|r=d|vr=tj|j|d�}|j�||�}z||}Wnty<}	zt||||	jd�d�d}	~	wwn|s|rLd|vrLt	|||��|S)Nr_z%()rTr)
r�	functools�partial�_interpolation_replacerjrkryr
r.r	)
r rTr-r?rO�varsrBr}ri�er"r"r#rVs0������
zLegacyInterpolation.before_getcCrSrr"rXr"r"r#rY%rWzLegacyInterpolation.before_setcCs(|�d�}|dur
|��Sd|�|�S)Nr_z%%(%s)s)rwrv)rurT�sr"r"r#r�(s
z*LegacyInterpolation._interpolation_replaceN)
r(r)r*r�r�rjrVrY�staticmethodr�r"r"r"r#rs
rc
s4eZdZ	dZdZdZe�Ze�	eej
�Ze�	ejdd�ej
�Z
e�	ejdd�ej
�Ze�	d�Zddddddddd	�Zd
edfddd
ddeeed
�dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdcdd�Zdcdd�Zdddd �Zded"d#�Zdcd$d%�Zdd
ed&�d'd(�Zd)d*�Z dd
ed&�d+d,�Z!dd
ed&�d-d.�Z"dd
ed&�d/d0�Z#dd
ed&�d1d2�Z$edd
f�fd3d4�	Z%d5d6�Z&d7d8�Z'd9d:�Z(dcd;d<�Z)dfd=d>�Z*d?d@�Z+dAdB�Z,dCdD�Z-dEdF�Z.dGdH�Z/dIdJ�Z0dKdL�Z1dMdN�Z2dOdP�Z3dQdR�Z4dSdT�Z5dUdV�Z6dWdX�Z7dYdZ�Z8d[d\�Z9d]d]d]d^�d_d`�Z:e;dadb��Z<�Z=S)grz�
        \[                                 # [
        (?P<header>.+)                     # very permissive!
        \]                                 # ]
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?P<vi>{delim})\s*              # any number of space/tab,
                                           # followed by any of the
                                           # allowed delimiters,
                                           # followed by any space/tab
        (?P<value>.*)$                     # everything up to eol
        a�
        (?P<option>.*?)                    # very permissive!
        \s*(?:                             # any number of space/tab,
        (?P<vi>{delim})\s*                 # optionally followed by
                                           # any of the allowed
                                           # delimiters, followed by any
                                           # space/tab
        (?P<value>.*))?$                   # everything up to eol
        z=|:�Zdelimz\STF)�1Zyes�trueZon�0ZnoZfalseZoffN��=r�)�#�;)�
delimiters�comment_prefixes�inline_comment_prefixes�strict�empty_lines_in_values�default_section�
interpolation�
convertersc
Cs:||_|��|_|��|_t|�|_|��|_t||	�|j|	<t|�|_|dkr2|r-|j	n|j
|_n'd�dd�|D��}|rLt
�|jj|d�t
j�|_n
t
�|jj|d�t
j�|_t|p]d�|_t|pdd�|_||_||_||_|	|_|
|_|jtur|j|_|jdur�t�|_|tur�|j�|�|r�|�|�dSdS)Nr��|css�|]}t�|�VqdSr)r��escape)�.0�dr"r"r#�	<genexpr>ks�z+RawConfigParser.__init__.<locals>.<genexpr>r�r")�_dict�	_sections�	_defaultsr�_converters�_proxiesr�tuple�_delimiters�	OPTCRE_NV�OPTCRE�_optcrer;r�r��_OPT_NV_TMPLr8�VERBOSE�	_OPT_TMPL�_comment_prefixes�_inline_comment_prefixes�_strict�_allow_no_value�_empty_lines_in_valuesr��_interpolation�_UNSET�_DEFAULT_INTERPOLATIONr�update�_read_defaults)
r rUZ	dict_typeZallow_no_valuer�r�r�r�r�r�r�r�r�r"r"r#rZsB




��

�zRawConfigParser.__init__cCr$r)r�r%r"r"r#rU�r'zRawConfigParser.defaultscCs	t|j���Sr)�listr��keysr%r"r"r#�sections�szRawConfigParser.sectionscCsL	||jkrtd|��||jvrt|��|��|j|<t||�|j|<dS)NzInvalid section name: %r)r�rCr�rr�rr�r/r"r"r#�add_section�s

zRawConfigParser.add_sectioncCs	||jvSr)r�r/r"r"r#�has_section�s
zRawConfigParser.has_sectioncCsF	z	|j|��}Wntyt|�d�w|�|j�t|���Sr)r��copyryrr�r�r�r�)r r-Zoptsr"r"r#�options�s
�zRawConfigParser.optionsc	Cs�	t|tttjf�r
|g}t�|�}g}|D]:}zt||d��}|�||�Wd�n1s0wYWn	t	y?Yqwt|tj�rKt�
|�}|�|�q|S)N)�encoding)�
isinstance�str�bytes�os�PathLike�io�
text_encoding�open�_read�OSError�fspathr7)r �	filenamesr�Zread_okrE�fpr"r"r#�read�s$
���
zRawConfigParser.readcCs<	|durz|j}Wntyd}Ynw|�||�dS)Nz<???>)�name�AttributeErrorr�)r �fr<r"r"r#�	read_file�s
�zRawConfigParser.read_file�<string>cCs	t�|�}|�||�dSr)r��StringIOr�)r �stringr<Zsfiler"r"r#�read_string�s
zRawConfigParser.read_string�<dict>c
Cs�	t�}|��D]]\}}t|�}z|�|�Wnttfy*|jr(||vr(�Ynw|�|�|��D]0\}}|�t|��}|durGt|�}|jrV||f|vrVt	|||��|�||f�|�|||�q4qdSr)
�setr�r�r�rrCr��addrvr)r Z
dictionaryr<�elements_addedr-r��keyrOr"r"r#�	read_dict�s,��
��zRawConfigParser.read_dictcCs$	tjdtdd�|j||d�dS)NzMThis method will be removed in Python 3.12. Use 'parser.read_file()' instead.rGrH)r<)rKrLrMr�)r r�rEr"r"r#�readfp�s�zRawConfigParser.readfp�rpr�rqcCs�	z|�||�}Wnty|tur�|YSw|�|�}z||}Wnty9|tur5t||��|YSw|s@|durB|S|j�|||||�Sr)�
_unify_valuesrr�rvryrr�rV)r r-r?rpr�rqr�rOr"r"r#rt�s*�

��zRawConfigParser.getcKs||j||fi|���Sr)rt)r r-�convr?�kwargsr"r"r#�_get$szRawConfigParser._getc	KsDz|j|||f||d�|��WSttfy!|tur�|YSw)N)rpr�)r�rrr�)r r-r?r�rpr�rqr�r"r"r#�	_get_conv's��zRawConfigParser._get_convcK�|j||tf|||d�|��S�Nr�)r��int�r r-r?rpr�rqr�r"r"r#�getint2�
��zRawConfigParser.getintcKr�r�)r��floatr�r"r"r#�getfloat7r�zRawConfigParser.getfloatcKs |j|||jf|||d�|��Sr�)r��_convert_to_booleanr�r"r"r#�
getboolean<s
��zRawConfigParser.getbooleancs�	�tur
t���S�j���z
���j��Wnty+��jkr)t	���Ynwt
����}|rD|��D]\}}|���|�<q8���fdd��|rT�fdd���fdd�|D�S)Ncs�j���|�|��Sr)r�rV�r?)r�r-r r"r#�<lambda>Ys�z'RawConfigParser.items.<locals>.<lambda>cs�|Srr"r�)r�r"r#r�\scsg|]}|�|�f�qSr"r")r�r?)�value_getterr"r#�
<listcomp>]sz)RawConfigParser.items.<locals>.<listcomp>)
r��superr�r�r�r�r�ryr�rr�r�rv)r r-rpr�Z	orig_keysr�rO��	__class__)r�r-r r�r#r�As&



��zRawConfigParser.itemscCs,	|��D]}||}||=||fSt�r)r�ry�r r�rOr"r"r#�popitem_szRawConfigParser.popitemcCs|��Sr)�lower)r Z	optionstrr"r"r#rvlszRawConfigParser.optionxformcCsT	|r||jkr|�|�}||jvS||jvrdS|�|�}||j|vp)||jvS)NF)r�rvr�r�)r r-r?r"r"r#�
has_optionos



�zRawConfigParser.has_optioncCsh	|r|j�||||�}|r||jkr|j}nz|j|}Wnty*t|�d�w|||�|�<dSr)r�rYr�r�r�ryrrv)r r-r?rO�sectdictr"r"r#r�}s�
�zRawConfigParser.setcCsj	|rd�|jd�}n|jd}|jr |�||j|j��|�|jD]}|�|||j|��|�q#dS)Nz {} r)r8r�r��_write_sectionr�r�r�)r r�Zspace_around_delimitersr�r-r"r"r#�write�s


�
��zRawConfigParser.writecCsz	|�d�|��|D]*\}}|j�||||�}|dus|js*|t|��dd�}nd}|�d�||��q|�d�dS)Nz[{}]
�
z
	rz{}{}
)rr8r�r[r�r�ri)r r�Zsection_nameZ
section_itemsZ	delimiterr�rOr"r"r#r�s�zRawConfigParser._write_sectioncCs`	|r||jkr|j}nz|j|}Wntyt|�d�w|�|�}||v}|r.||=|Sr)r�r�r�ryrrv)r r-r?r�existedr"r"r#�
remove_option�s
�
zRawConfigParser.remove_optioncCs$	||jv}|r|j|=|j|=|Sr)r�r�)r r-rr"r"r#�remove_section�s
zRawConfigParser.remove_sectioncCs&||jkr|�|�st|��|j|Sr)r�r�ryr��r r�r"r"r#�__getitem__�s
zRawConfigParser.__getitem__cCsX||vr|||urdS||jkr|j��n||jvr#|j|��|�||i�dSr)r�r��clearr�r�r�r"r"r#�__setitem__�s

zRawConfigParser.__setitem__cCs2||jkr	td��|�|�st|��|�|�dS)Nz"Cannot remove the default section.)r�rCr�ryrr	r"r"r#�__delitem__�s


zRawConfigParser.__delitem__cCs||jkp	|�|�Sr)r�r�r	r"r"r#�__contains__�szRawConfigParser.__contains__cCst|j�dS)Nr_)r�r�r%r"r"r#�__len__�szRawConfigParser.__len__cCst�|jf|j���Sr)�	itertools�chainr�r�r�r%r"r"r#�__iter__�szRawConfigParser.__iter__cCs	t�}d}d}d}d}d}d}	t|dd�D�]e\}}
tj}dd�|jD�}|tjkrg|rgi}
|��D]*\}}|
�||d�}|dkrDq3||
|<|dksX|dkr]|
|d��r]t||�}q3|
}|tjkrg|s-|j	D]
}|
�
��|�rwd}nqj|tjkrd}|
d|��
�}|s�|jr�|dur�|dur�|r�||dur�||�
d�ntj}q|j�|
�}|r�|��nd}|dur�|r�||kr�||�
|�q|}|j�|�}|�r|�d�}||jvr�|jr�||vr�t|||��|j|}|�|�n||jkr�|j}n|��}||j|<t||�|j|<|�|�d}q|du�r"t|||
��|j�|�}|�rt|�d	d
d�\}}}|�s@|�|	|||
�}	|� |�!��}|j�rY||f|v�rYt"||||��|�||f�|du�ro|�
�}|g||<qd||<q|�|	|||
�}	q|�#�|	�r�|	�dS)Nrr_)�startcSsi|]}|d�qS)���r")r�r~r"r"r#�
<dictcomp>sz)RawConfigParser._read.<locals>.<dictcomp>rr�headerr?�virO)$r��	enumerate�sys�maxsizer�r�rl�isspace�minr��strip�
startswithr�r7�NONSPACECRE�searchr�SECTCRErurwr�r�rr�r�r�r�rr�r
r��
_handle_errorrv�rstripr�_join_multiline_values)r r��fpnamer�ZcursectZsectnameZoptnamer=Zindent_levelr�rPZ
comment_startZinline_prefixesZ
next_prefixes�prefix�indexrOZfirst_nonspaceZcur_indent_levelZmorZoptvalr"r"r#r��s� 
��
�
��

�




�

�zRawConfigParser._readcCsr|j|jf}t�|f|j���}|D]$\}}|��D]\}}t|t�r*d�|��	�}|j
�||||�||<qqdS)Nr)r�r�rrr�r�r�r�r;r#r�rZ)r rUZall_sectionsr-r�r��valr"r"r#r$`s�

���z&RawConfigParser._join_multiline_valuescCs(	|��D]\}}||j|�|�<qdSr)r�r�rv)r rUr�rOr"r"r#r�ls�zRawConfigParser._read_defaultscCs |st|�}|�|t|��|Sr)rr7r6)r �excr%r=rPr"r"r#r"rszRawConfigParser._handle_errorcCs�	i}z|j|}Wnty||jkrt|�d�Ynwi}|r:|��D]\}}|dur2t|�}|||�|�<q&t|||j�Sr)	r�ryr�rr�r�rv�	_ChainMapr�)r r-r�ZsectiondictZvardictr�rOr"r"r#r�xs 

��zRawConfigParser._unify_valuescCs*	|��|jvrtd|��|j|��S)NzNot a boolean: %s)r�BOOLEAN_STATESrCrNr"r"r#r��sz#RawConfigParser._convert_to_booleanr)r-r?rOcCsJ	t|t�s
td��t|t�std��|jr|r#t|t�s!td��dSdS)Nzsection names must be stringszoption keys must be stringszoption values must be strings)r�r��	TypeErrorr��r r-r?rOr"r"r#�_validate_value_types�s



��z%RawConfigParser._validate_value_typescCr$r)r�r%r"r"r#r��szRawConfigParser.convertersr)r�)r�)T)>r(r)r*Z
_SECT_TMPLr�r�rr�r�r�r�r!r8r�r�rr+�
_default_dictrr�rrUr�r�r�r�r�r�r�r�r�rtr�r�r�r�r�r�r�rvrr�rrrrr
rr
rrrr�r$r�r"r�r�r.rQr��
__classcell__r"r"r�r#r1s�

���(
	



	%����




zrcs:eZdZ	e�Zd�fdd�	Z�fdd�Zdd�Z�ZS)	rNcs$	|j||d�t��|||�dS�N)r?rO)r.r�r�r-r�r"r#r��szConfigParser.setcs	|j|d�t��|�dS)N)r-)r.r�r�r/r�r"r#r��szConfigParser.add_sectioncCs6	z|j}t�|_|�|j|i�W||_dS||_wr)r�rr�r�)r rUZhold_interpolationr"r"r#r��szConfigParser._read_defaultsr)	r(r)r*rr�r�r�r�r0r"r"r�r#r�srcseZdZ	�fdd�Z�ZS)rcs&t�j|i|��tjdtdd�dS)Nz�The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in Python 3.12. Use ConfigParser directly instead.rGrH)r�rrKrLrM)r r.r�r�r"r#r�s

�zSafeConfigParser.__init__)r(r)r*rr0r"r"r�r#r�src@s�eZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zedd��Z
edd��Zddddd�dd�ZdS)rcCsH	||_||_|jD]}d|}tj|jt||�d�}t|||�q
dS)Nrt��_impl)�_parser�_namer�r�r�rt�getattr�setattr)r rTr�r�r��getterr"r"r#r�s
�zSectionProxy.__init__cCsd�|j�S)Nz
<Section: {}>)r8r5r%r"r"r#r&��zSectionProxy.__repr__cCs(|j�|j|�st|��|j�|j|�Sr)r4rr5ryrtr	r"r"r#r
�szSectionProxy.__getitem__cCs"|jj||d�|j�|j||�Sr1)r4r.r�r5r�r"r"r#r�szSectionProxy.__setitem__cCs,|j�|j|�r|j�|j|�st|��dSr)r4rr5rryr	r"r"r#r
�s
��zSectionProxy.__delitem__cCs|j�|j|�Sr)r4rr5r	r"r"r#r�szSectionProxy.__contains__cCst|���Sr)r��_optionsr%r"r"r#r�r9zSectionProxy.__len__cCs|����Sr)r:rr%r"r"r#r�r9zSectionProxy.__iter__cCs&|j|jjkr|j�|j�S|j��Sr)r5r4r�r�rUr%r"r"r#r:s
zSectionProxy._optionscCr$r)r4r%r"r"r#rT�zSectionProxy.parsercCr$r)r5r%r"r"r#r�r;zSectionProxy.nameNF)rpr�r3cKs*	|s|jj}||j|f|||d�|��Sr�)r4rtr5)r r?rqrpr�r3r�r"r"r#rts��zSectionProxy.getr)r(r)r*rr&r
rr
rrrr:rQrTr�rtr"r"r"r#r�s$	

�rc@sHeZdZ	e�d�Zdd�Zdd�Zdd�Zdd	�Z	d
d�Z
dd
�ZdS)rz^get(?P<name>.+)$cCsR||_i|_t|j�D]}|j�|�}|rtt|j|��sqd|j|�d�<qdS)Nr�)r4�_data�dir�	GETTERCREru�callabler6rw)r rTr8r�r"r"r#r*s�zConverterMapping.__init__cCs
|j|Sr)r<r	r"r"r#r
3�
zConverterMapping.__getitem__c	Cs�zd|}Wntytd�|t|����w|dkr td��||j|<tj|jj|d�}||_	t
|j||�|j��D]}tj|j|d�}t
|||�q=dS)NrtzIncompatible key: {} (type: {})z)Incompatible key: cannot use "" as a name)r�r2)
r,rCr8�typer<r�r�r4r�Z	converterr7�valuesrt)r r�rO�k�func�proxyr8r"r"r#r6s"��
�zConverterMapping.__setitem__c	Cspzd|pd}Wntyt|��w|j|=t�|jf|j���D]}zt||�Wq#ty5Yq#wdS)Nrt)	r,ryr<rrr4rB�delattrr�)r r�rC�instr"r"r#r
Fs���zConverterMapping.__delitem__cC�
t|j�Sr)�iterr<r%r"r"r#rTr@zConverterMapping.__iter__cCrHr)r�r<r%r"r"r#rWr@zConverterMapping.__len__N)r(r)r*r�r�r>rr
rr
rrr"r"r"r#r s
	r)(Zcollections.abcr�collectionsrr*r�r�rr�r�rrK�__all__r�r/rrrrrrrrrr
rr	rr
�objectr�rrrrrrrrrr"r"r"r#�<module>sR	
	

+HJ& 
F