
    Mh                     \    d Z  G d d          Z G d de          Z G d de          ZdS )zs
Autocall capabilities for IPython.core.

Authors:

* Brian Granger
* Fernando Perez
* Thomas Kluyver

Notes
-----
c                   (    e Zd ZdZdZdZddZ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                     || _         d S N_ipselfips     U/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/IPython/core/autocall.py__init__zIPyAutocall.__init__'   s        c                     || _         dS )zWill 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   s     r   set_ipzIPyAutocall.set_ip*   s     r   r   )__name__
__module____qualname____doc__r   rewriter   r    r   r   r   r      sM         
 CG       r   r   c                       e Zd ZdZdZd ZdS )ExitAutocallzAn 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                 8    | j                                          d S r   )r   ask_exit)r	   s    r   __call__zExitAutocall.__call__8   s    r   N)r   r   r   r   r   r   r   r   r   r   r   3   s4        K KG    r   r   c                       e Zd ZdZddZdS )ZMQExitAutocallzExit 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                 P    || j         _        | j                                          d S r   )r   keepkernel_on_exitr   )r	   keep_kernels     r   r   zZMQExitAutocall.__call__D   s&    &1#r   N)F)r   r   r   r   r   r   r   r   r   r   ;   s2              r   r   N)r   r   r   r   r   r   r   <module>r       s    :       (    ;       l     r   