Server : LiteSpeed System : Linux server64.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : nimalaab ( 3358) PHP Version : 8.1.32 Disable Function : NONE Directory : /opt/alt/python37/lib64/python3.7/site-packages/pyrsistent/__pycache__/ |
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>