name : _transformations.cpython-39.pyc
a

`�]_��@s�ddlZzddlmZmZWn"ey>dZddlmZYn0e�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zedur�dd�Zndd�Zdd�ZdS)�N)�	Parameter�	signature)�getfullargspeccCs|dS)z Add one to the current value ����xrr�A/usr/lib64/python3.9/site-packages/pyrsistent/_transformations.py�incsr
cCs|dS)z% Subtract one from the current value rrrrrr	�decsrcCs"z
||=WntyYn0dS)zL Discard the element and returns a structure without the discarded elements N)�KeyError)�evolver�keyrrr	�discards
rcst�|���fdd�S)zE Regular expression matcher to use together with transform functions cst|t�o��|�S�N)�
isinstance�str�match)r��rrr	�<lambda>"�zrex.<locals>.<lambda>)�re�compile)�exprrrr	�rexs
rcCsdS)z  Matcher that matches any value Tr)�_rrr	�ny%srccs,tdt|�|�D]}||||�VqdS)Nr)�range�len)�l�n�irrr	�_chunks+sr#cCs(|}t|d�D]\}}t|||�}q|S)N�)r#�_do_to_path)�	structureZtransformationsr�path�commandrrr	�	transform0sr)cCs<|st|�r||�S|St||d�}t|||dd�|�S)Nrr)�callable�_get_keys_and_values�_update_structure)r&r'r(�kvsrrr	r%7sr%cCs.z
|��WSty(tt|��YS0dSr)�items�AttributeError�list�	enumerate)r&rrr	�_items?s
r2c	Cs@z t|d�r||WSt||�WSttfy:|YS0dS)N�__getitem__)�hasattr�getattr�
IndexErrorr)r&r�defaultrrr	�_getGs

r8csft��rTt��}|dkr.�fdd�t|�D�S|dkrL�fdd�t|�D�Std���t|�t�fgS)Nrcs g|]\}}�|�r||f�qSrr��.0�k�v��key_specrr	�
<listcomp>Yrz(_get_keys_and_values.<locals>.<listcomp>r$cs"g|]\}}�||�r||f�qSrrr9r=rr	r?]rz5callable in transform path must take 1 or 2 arguments)r*�
_get_arityr2�
ValueErrorr8�_EMPTY_SENTINEL)r&r>Zarityrr=r	r+Rs�r+cCs t|�}t|j�t|jpd�S)Nr)rr�args�defaults)�fZargspecrrr	r@isr@cCstdd�t|�j��D��S)Ncss0|](}|jtjur|jtjtjfvrdVqdS)rN)r7r�empty�kindZPOSITIONAL_ONLYZPOSITIONAL_OR_KEYWORD)r:�prrr	�	<genexpr>ns�z_get_arity.<locals>.<genexpr>)�sumr�
parameters�values)rErrr	r@ms�c
Cs�ddlm}|��}|s>|tur>t|�D]\}}t||�q(nD|D]>\}}d}|tur`d}|�}t|||�}	|	|usx|rB|	||<qB|��S)Nr)�pmapFT)Zpyrsistent._pmaprMr
r�reversedrBr%Z
persistent)
r&r-r'r(rM�er;r<Zis_empty�resultrrr	r,ws
r,)r�inspectrr�ImportErrorr�objectrBr
rrrrr#r)r%r2r8r+r@r,rrrr	�<module>s*	


© 2025 Cubjrnet7