|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/local/lib64/python3.6/site-packages/pyrsistent/__pycache__/ |
Upload File : |
3
G�Kd= � @ sl d dl mZmZ d dlZd dlmZ G dd� de�Zeje� eje� ee� �Z f dfdd�Z
d d
� ZdS )� )�Set�HashableN)�pmapc s e Zd ZdZd%Z� fdd�Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Ze
d&dd��Zdd� Zdd� Zdd� Zdd� ZG dd � d e�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| �j| �}||_|S )N)�superr �__new__r )�cls�m�self)� __class__� �6/tmp/pip-build-8nxjc3nm/pyrsistent/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__&