| Server IP : 162.19.112.25 / Your IP : 216.73.216.88 Web Server : LiteSpeed System : Linux qamar.tasjeel.ae 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : archiart ( 1428) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/pyrsistent/__pycache__/ |
Upload File : |
�
k��K�/b� �
� d dl mZmZmZmZ d dlmZ d dlmZ d� Z G d� de
� � Z ej e� � ej e� � ej e� � ej e� � d� Z
d� Z e e� � � � Zd S )
� )� Container�Iterable�Sized�Hashable)�reduce)�pmapc �\ � | � || � |d� � dz � � S )Nr � )�set�get)�counters�elements �b/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/pyrsistent/_pbag.py�_add_to_countersr s) � ��<�<�����g�q�!9�!9�A�!=�>�>�>� c � � e Zd ZdZdZd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� ZeZeZeZd� Zd� Zd� Zd� Zd� ZdS )�PBaga�
A persistent bag/multiset type.
Requires elements to be hashable, and allows duplicates, but has no
ordering. Bags are hashable.
Do not instantiate directly, instead use the factory functions :py:func:`b`
or :py:func:`pbag` to create an instance.
Some examples:
>>> s = pbag([1, 2, 3, 1])
>>> s2 = s.add(4)
>>> s3 = s2.remove(1)
>>> s
pbag([1, 1, 2, 3])
>>> s2
pbag([1, 1, 2, 3, 4])
>>> s3
pbag([1, 2, 3, 4])
)�_counts�__weakref__c � � || _ d S )N�r )�self�countss r �__init__z
PBag.__init__# s
� �����r c �F � t t | j |� � � � S )z�
Add an element to the bag.
>>> s = pbag([1])
>>> s2 = s.add(1)
>>> s3 = s.add(2)
>>> s2
pbag([1, 1])
>>> s3
pbag([1, 2])
)r r r �r r s r �addzPBag.add&