
    og                          G d  d      Z y)c                   "    e Zd ZdZd Zd Zd Zy)KeepContexta  
    Context manager that receives a `django.template.Context` instance and a list of keys

    Once the context manager is exited, it removes `keys` from the context, to avoid
    side effects in later layout objects that may use the same context variables.

    Layout objects should use `extra_context` to introduce context variables, never
    touch context object themselves, that could introduce side effects.
    c                      || _         || _        y N)contextkeys)selfr   r   s      J/var/www/medrc_site/venv/lib/python3.12/site-packages/crispy_forms/base.py__init__zKeepContext.__init__   s    	    c                      y r    )r   s    r	   	__enter__zKeepContext.__enter__   s    r   c                 p    t        | j                        D ]  }|| j                  v s| j                  |=   y r   )listr   r   )r   typevalue	tracebackkeys        r	   __exit__zKeepContext.__exit__   s1    		? 	&Cdll"LL%	&r   N)__name__
__module____qualname____doc__r
   r   r   r   r   r	   r   r      s    &r   r   N)r   r   r   r	   <module>r      s   & &r   