0x1949 Team - FAZEMRX - MANAGER
Edit File: _helpers.cpython-310.pyc
o ���a� � @ s\ d dl mZ d dlmZmZ d dlmZmZ d dlm Z m Z d dd�Zd dd �Zd d� Z dS )� ��wraps)�PMap�pmap)�PSet�pset)�PVector�pvectorTc s� t | �}|tu s� rt| t�rt� fdd�| �� D ��S |tu s'� r4t| t�r4� fdd�}tt || ��S |t u rE� fdd�}t t || ��S |tu rMt| �S | S )a} Recursively convert simple Python containers into pyrsistent versions of those containers. - list is converted to pvector, recursively - dict is converted to pmap, recursively on values (but not keys) - set is converted to pset, but not recursively - tuple is converted to tuple, recursively. If strict == True (default): - freeze is called on elements of pvectors - freeze is called on values of pmaps Sets and dict keys are not recursively frozen because they do not contain mutable data by convention. The main exception to this rule is that dict keys and set elements are often instances of mutable objects that support hash-by-id, which this function can't convert anyway. >>> freeze(set([1, 2])) pset([1, 2]) >>> freeze([1, {'a': 3}]) pvector([1, pmap({'a': 3})]) >>> freeze((1, [])) (1, pvector([])) c � i | ] \}}|t |� ��qS � ��freeze��.0�k�v��strictr �5/usr/lib/python3/dist-packages/pyrsistent/_helpers.py� <dictcomp># � zfreeze.<locals>.<dictcomp>c � t | � �S �Nr ��xr r r �<lambda>% � zfreeze.<locals>.<lambda>c r r r r r r r r ( r ) �type�dict� isinstancer r �items�listr r �map�tuple�setr )�or �typ�curried_freezer r r r s r c s� t | �}t| t�s� r|tu r� fdd�}tt|| ��S t| t�s'� r2|tu r2� fdd�| �� D �S |tu rC� fdd�}tt|| ��S t| t �rLt | �S | S )a? Recursively convert pyrsistent containers into simple Python containers. - pvector is converted to list, recursively - pmap is converted to dict, recursively on values (but not keys) - pset is converted to set, but not recursively - tuple is converted to tuple, recursively. If strict == True (the default): - thaw is called on elements of lists - thaw is called on values in dicts >>> from pyrsistent import s, m, v >>> thaw(s(1, 2)) {1, 2} >>> thaw(v(1, m(a=3))) [1, {'a': 3}] >>> thaw((1, v())) (1, []) c r r ��thawr r r r r H r zthaw.<locals>.<lambda>c r r r( r r r r r K r zthaw.<locals>.<dictcomp>c r r r( r r r r r M r )r r r r! r"