Y+ d dl mZmZ d dlmZ d dlmZ d dlmZ G d d Z G d de Z G d d e Z G d de Z ej e ej e d Z ei d Zi d fdZd ZdS ) )MappingHashable)chain)pvector transformc * e Zd ZdZd Zd Zd Zd ZdS )PMapViewa View type for the persistent map/dict type `PMap`. Provides an equivalent of Python's built-in `dict_values` and `dict_items` types that result from expreessions such as `{}.values()` and `{}.items()`. The equivalent for `{}.keys()` is absent because the keys are instead represented by a `PSet` object, which can be created in `O(1)` time. The `PMapView` class is overloaded by the `PMapValues` and `PMapItems` classes which handle the specific case of values and items, respectively Parameters ---------- m : mapping The mapping/dict-like object of which a view is to be created. This should generally be a `PMap` object. c t |t s4t |t rt | }nt d t | d| d S )Nz"PViewMap requires a Mapping object_map) isinstancePMapr pmap TypeErrorobject__setattr__)selfms b/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyrsistent/_pmap.py__init__zPMapView.__init__ sb !T"" F!W%% FGG DEEE4+++++ c * t | j S N)lenr r s r __len__zPMapView.__len__" s 49~~r c @ t t | d )Nz is immutable)r type)r kvs r r zPMapView.__setattr__% s T$ZZZZ9:::r c t d Nz"Persistent maps are not reversibler r s r __reversed__zPMapView.__reversed__( <===r N)__name__ __module____qualname____doc__r r r r$ r r r r sZ ", , , ; ; ;> > > > >r r c 0 e Zd ZdZd Zd Zd Zd Zd ZdS ) PMapValuesa View type for the values of the persistent map/dict type `PMap`. Provides an equivalent of Python's built-in `dict_values` type that result from expreessions such as `{}.values()`. See also `PMapView`. Parameters ---------- m : mapping The mapping/dict-like object of which a view is to be created. This should generally be a `PMap` object. c 4 | j S r r itervaluesr s r __iter__zPMapValues.__iter__7 s y##%%%r c 8 || j v S r r. )r args r __contains__zPMapValues.__contains__: s di**,,,,r c B dt t | dS Nzpmap_values()listiterr s r __str__zPMapValues.__str__> ! 1d4::..1111r c B dt t | dS r5 r7 r s r __repr__zPMapValues.__repr__A r; r c || u rdS dS NTFr* r xs r __eq__zPMapValues.__eq__D s 99TTUr N r&