🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 09:19:35 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
operators
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/__pycache__
🔄 Refresh
✏️
Editing: _distinctuntilchanged.cpython-38.pyc
Read Only
U v�i5 � @ s� d dl mZmZmZmZ d dlmZmZ d dlm Z m Z d dlmZm Z ed�Zed�Zdee eef eee eee gee f d�d d �Zd gZdS )� )�Callable�Optional�TypeVar�cast)� Observable�abc)�default_comparer�identity)�Comparer�Mapper�_T�_TKeyN)� key_mapper�comparer�returnc sB | pt ttgtf t��|pt� tt tt d�� �fdd�}|S )N)�sourcer c s2 dt jt tt j t jd���� fdd� }t|�S )ay Returns an observable sequence that contains only distinct contiguous elements according to the key_mapper and the comparer. Examples: >>> op = distinct_until_changed(); >>> op = distinct_until_changed(lambda x: x.id) >>> op = distinct_until_changed(lambda x: x.id, lambda x, y: x == y) Args: key_mapper: [Optional] A function to compute the comparison key for each element. If not provided, it projects the value. comparer: [Optional] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. Returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. N)�observer� schedulerr c s@ d�t td �� td d��� ���fdd�}�j|�j�j|d�S )NF)�valuer c s� d}z�| �}W n2 t k rB } z��|� W Y �d S d }~X Y nX �r�z� �|�}W n2 t k r� } z��|� W Y �d S d }~X Y nX �r�|s�d�|���| � d S )NFT)� Exception�on_error�on_next)r Zcomparer_equals�key� exception)� comparer_�current_key�has_current_key�key_mapper_r � �Z/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_distinctuntilchanged.pyr 2 s z[distinct_until_changed_.<locals>.distinct_until_changed.<locals>.subscribe.<locals>.on_next)r )r r r � subscriber Zon_completed)r r r )r r r )r r r r r + s �zJdistinct_until_changed_.<locals>.distinct_until_changed.<locals>.subscribe)N)r ZObserverBaser r Z SchedulerBaseZDisposableBaser )r r �r r )r r �distinct_until_changed s �� z7distinct_until_changed_.<locals>.distinct_until_changed)r r r r r r r )r r r"