🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 09:17:16 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
reactivex
/
observable
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/reactivex/observable/__pycache__
🔄 Refresh
✏️
Editing: fromcallback.cpython-38.pyc
Read Only
U v�iV � @ sx d dl mZmZmZ d dlmZmZm Z d dlmZ d eded f ee j eef eg ee f d�dd �Z d gZdS )� )�Any�Callable�Optional)� Observable�abc�typing)� DisposableN.).N)�func�mapper�returnc s t tt d�� �fdd�}|S )a Converts a callback function to an observable sequence. Args: func: Function with a callback as the last argument to convert to an Observable sequence. mapper: [Optional] A mapper which takes the arguments from the callback to produce a single item to yield on next. Returns: A function, when executed with the required arguments minus the callback, produces an Observable sequence with a single value of the arguments to the callback as a list. ��argsr c s: t | �� dtjt ttj tjd�� ��fdd� }t|�S )N)�observer� schedulerr c s. t d d��� fdd�}��|� ��� t� S )Nr c s� t | �}� rXz� | �}W n2 tk rJ } z��|� W Y �d S d }~X Y nX ��|� n*t|�dkrp�j|� n ��|� ��� d S )N� )�list� ExceptionZon_errorZon_next�lenZon_completed)r �results�err)r r � �R/opt/alt/python38/lib/python3.8/site-packages/reactivex/observable/fromcallback.py�handler s zDfrom_callback_.<locals>.function.<locals>.subscribe.<locals>.handler)r �appendr )r r r )� argumentsr r )r r � subscribe s z3from_callback_.<locals>.function.<locals>.subscribe)N)r r ZObserverBaser r Z SchedulerBaseZDisposableBaser )r r �r r )r r �function s ��z from_callback_.<locals>.function)r r )r r r r r r �from_callback_ s r )N)r r r r Z reactivexr r Zreactivex.disposabler ZMapperr �__all__r r r r �<module> s ��4
💾 Save Changes
❌ Cancel