U
    -e                     @   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   V/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/IPython/core/autocall.py__init__'   s    zIPyAutocall.__init__c                 C   s
   || _ 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   r   r   r	   set_ip*   s    zIPyAutocall.set_ip)N)__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 )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                 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 )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                 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   