U vâ’i ã@s†ddlmZddlmZmZmZmZmZddlm Z ddlm Z edƒZ d ee ee ee ee e ge e fdœdd „Zd gZdS) é)Úmaxsize)ÚAnyÚCallableÚListÚOptionalÚTypeVar)Ú Observable)Ú operatorsÚ_TN)ÚstartÚstopÚstepÚreturncsZ|dkr dn|‰|dkrtn|‰|dkr,dn|‰g‰ttttdœ‡‡‡‡fdd„ }|S)Nré)Úsourcercs¢ˆdkrˆ t ˆ¡¡ˆdkr2ˆ t ˆ¡¡nˆdkrLˆ t ˆ ¡¡ˆdkrfˆ t ˆ ¡¡ˆdkrˆˆ t ‡fdd„¡¡nˆdkr˜tdƒ‚|jˆŽS)a#The partially applied slice operator. Slices the given observable. It is basically a wrapper around the operators :func:`skip `, :func:`skip_last `, :func:`take `, :func:`take_last ` and :func:`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. rrcs |ˆdkS)Nr©)ÚxÚi)Ú_steprúK/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_slice.pyÚAóz'slice_..slice..zNegative step not supported.) ÚappendÚopsZtakeÚskipZ take_lastZ skip_lastZfilter_indexedÚ TypeErrorÚpipe)r©Ú_startrÚ_stopZpipelinerrÚslices!zslice_..slice)rrr )r r r r rrrÚslice_ s "4r!)NNN)ÚsysrÚtypingrrrrrZ reactivexrr rr Úintr!Ú__all__rrrrÚs   ÿþ @