o
    û›hÇ  ã                   @   s8   d Z G dd„ deƒZG dd„ deƒZG dd„ deƒZdS )zs
Autocall capabilities for IPython.core.

Authors:

* Brian Granger
* Fernando Perez
* Thomas Kluyver

Notes
-----
c                   @   s*   e Zd ZdZdZdZddd„Zdd„ ZdS )	ÚIPyAutocallz¡ Instances of this class are always autocalled
    
    This happens regardless of 'autocall' variable state. Use this to
    develop macro-like mechanisms.
    NTc                 C   s
   || _ d S ©N©Ú_ip©ÚselfÚip© r   úKc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/core/autocall.pyÚ__init__'   s   
zIPyAutocall.__init__c                 C   s
   || _ dS )zŒWill be used to set _ip point to current ipython instance b/f call

        Override this method if you don't want this to happen.

        Nr   r   r   r   r	   Úset_ip*   s   
zIPyAutocall.set_ipr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úrewriter
   r   r   r   r   r	   r      s    
r   c                   @   s   e Zd ZdZdZdd„ ZdS )ÚExitAutocallz�An autocallable object which will be added to the user namespace so that
    exit, exit(), quit or quit() are all valid ways to close the shell.Fc                 C   s   | j  ¡  d S r   )r   Úask_exit)r   r   r   r	   Ú__call__8   s   zExitAutocall.__call__N)r   r   r   r   r   r   r   r   r   r	   r   3   s    r   c                   @   s   e Zd ZdZddd„ZdS )ÚZMQExitAutocallzÝExit IPython. Autocallable, so it needn't be explicitly called.
    
    Parameters
    ----------
    keep_kernel : bool
      If True, leave the kernel alive. Otherwise, tell the kernel to exit too
      (default).
    Fc                 C   s   || j _| j  ¡  d S r   )r   Zkeepkernel_on_exitr   )r   Zkeep_kernelr   r   r	   r   D   s   zZMQExitAutocall.__call__N)F)r   r   r   r   r   r   r   r   r	   r   ;   s    r   N)r   Úobjectr   r   r   r   r   r   r	   Ú<module>   s   