Mini Shell

Direktori : /usr/lib/python3.6/site-packages/dasbus/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/dasbus/__pycache__/signal.cpython-36.pyc

3

��^o�@sdgZGdd�de�ZdS)�Signalc@sBeZdZdZddgZdd�Zdd�Zdd	�Zd
d�Zdd
d�Z	dS)rz#Default representation of a signal.�
_callbacks�__weakref__cCs
g|_dS)zCreate a new signal.N)r)�self�r�/usr/lib/python3.6/signal.py�__init__!szSignal.__init__cCs|jj|�dS)zNConnect to a signal.

        :param callback: a function to register
        N)r�append)r�callbackrrr�connect%szSignal.connectcOs|j||�dS)z'Emit a signal with the given arguments.N)�emit)r�args�kwargsrrr�__call__,szSignal.__call__cOs"x|jj�D]}|||�qWdS)z'Emit a signal with the given arguments.N)r�copy)rrr
r	rrrr0szSignal.emitNcCs@|dkr|jj�dSy|jj|�Wntk
r:YnXdS)aDisconnect from a signal.

        If no callback is specified, then all functions will
        be unregistered from the signal.

        If the specified callback isn't registered, do nothing.

        :param callback: a function to unregister or None
        N)r�clear�remove�
ValueError)rr	rrr�
disconnect7s

zSignal.disconnect)N)
�__name__�
__module__�__qualname__�__doc__�	__slots__rr
rrrrrrrrsN)�__all__�objectrrrrr�<module>s