. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 162.0.212.4 / Your IP :
216.73.216.221 [
Web Server : LiteSpeed System : Linux premium146.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : alshnoli ( 2431) PHP Version : 8.3.28 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib64/python3.7/site-packages/pyrsistent/__pycache__/ |
Upload File : |
B
+�[V � @ sv d dl mZmZ ddlZddlmZ ejd dk ZG dd� de�Z e�
e � e�
e � e e� �Zdd
d�Zdd
� Z
dS )� )�Set�Hashable� N)�pmap� c s e Zd ZdZdZ� fdd�Zdd� Zdd� Zd d
� Zdd� Z d
d� Z
dd� Zdd� Ze
d$dd��Zdd� Zdd� Zdd� Zdd� ZG dd� de�Zd d!� Zd"d#� ZejZejZejZejZejZejZejZejZej Z ej!Z!eZ"eZ#eZ$eZ%e Z&e!Z'ej(Z(� Z)S )%�PSeta!
Persistent set implementation. Built on top of the persistent map. The set supports all operations
in the Set protocol and is Hashable.
Do not instantiate directly, instead use the factory functions :py:func:`s` or :py:func:`pset`
to create an instance.
Random access and insert is log32(n) where n is the size of the set.
Some examples:
>>> s = pset([1, 2, 3, 1])
>>> s2 = s.add(4)
>>> s3 = s2.remove(2)
>>> s
pset([1, 2, 3])
>>> s2
pset([1, 2, 3, 4])
>>> s3
pset([1, 3, 4])
)�_map�__weakref__c s t t| ��| �}||_|S )N)�superr �__new__r )�cls�m�self)� __class__� �C/opt/alt/python37/lib64/python3.7/site-packages/pyrsistent/_pset.pyr s zPSet.__new__c C s
|| j kS )N)r )r �elementr r r �__contains__% s zPSet.__contains__c C s
t | j�S )N)�iterr )r r r r �__iter__( s z
PSet.__iter__c C s
t | j�S )N)�lenr )r r r r �__len__+ s zPSet.__len__c C s2 t s| sdtt| �� S d�tt| ��dd� �S )N�pzpset([{0}])r ���)�PY2�str�set�format)r r r r �__repr__. s z
PSet.__repr__c C s | � � S )N)r )r r r r �__str__4 s zPSet.__str__c C s
t | j�S )N)�hashr )r r r r �__hash__7 s z
PSet.__hash__c C s t t| �ffS )N)�pset�list)r r r r �
__reduce__: s zPSet.__reduce__� c C s t ttdd� |D ��|d��S )Nc s s | ]}|d fV qdS )TNr )�.0�kr r r � <genexpr>@ s z&PSet._from_iterable.<locals>.<genexpr>)�pre_size)r r �dict)r �itr) r r r �_from_iterable>