🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 16:10:38 | 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: _slice.cpython-38.pyc
Read Only
U v�i � @ s� d dl mZ d dlmZmZmZmZmZ d dlm Z d dlm Z ed�Zd ee ee ee ee e ge e f d�dd �Zd gZdS )� )�maxsize)�Any�Callable�List�Optional�TypeVar)� Observable)� operators�_TN)�start�stop�step�returnc sZ | d krdn| � |d krt n|�|d kr,dn|�g �tt tt d�� ���fdd�}|S )Nr � )�sourcer c s� �dkr�� t���� � dkr2�� t�� �� n� dk rL�� t�� �� �dk rf�� t�� �� �dkr��� t��fdd��� n�dk r�td��| j�� S )a# The partially applied slice operator. Slices the given observable. It is basically a wrapper around the operators :func:`skip <reactivex.operators.skip>`, :func:`skip_last <reactivex.operators.skip_last>`, :func:`take <reactivex.operators.take>`, :func:`take_last <reactivex.operators.take_last>` and :func:`filter <reactivex.operators.filter>`. The following diagram helps you remember how slices works with streams. Positive numbers are relative to the start of the events, while negative numbers are relative to the end (close) of the stream. .. code:: r---e---a---c---t---i---v---e---! 0 1 2 3 4 5 6 7 8 -8 -7 -6 -5 -4 -3 -2 -1 0 Examples: >>> result = source.slice(1, 10) >>> result = source.slice(1, -2) >>> result = source.slice(1, -1, 2) Args: source: Observable to slice Returns: A sliced observable sequence. r r c s |� dkS )Nr � )�x�i)�_stepr �K/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_slice.py�<lambda>A � z'slice_.<locals>.slice.<locals>.<lambda>zNegative step not supported.) �append�opsZtake�skipZ take_lastZ skip_lastZfilter_indexed� TypeError�pipe)r ��_startr �_stopZpipeliner r �slice s !zslice_.<locals>.slice)r r r )r r r r r r r �slice_ s "4r! )NNN)�sysr �typingr r r r r Z reactivexr r r r �intr! �__all__r r r r �<module> s � �@
💾 Save Changes
❌ Cancel