ó
”¼\c           @   sv   d  d l  m Z d d l m Z d e f d     YZ e e g  Z e e g  Z e d    Z	 e d    Z
 d S(	   i   (   t   clear_cachei’’’’(   t   contextmanagert   _global_functionc           B   s   e  Z d  Z d   Z RS(   sA    The cache must be cleared whenever _global_function is changed. c         C   s7   |  | | k r t    n  t t |   j | |  d  S(   N(   R    t   superR   t   __setitem__(   t   selft   keyt   value(    (    s2   lib/python2.7/site-packages/sympy/core/evaluate.pyR      s    
(   t   __name__t
   __module__t   __doc__R   (    (    (    s2   lib/python2.7/site-packages/sympy/core/evaluate.pyR      s   c         c   s'   t  d } |  t  d <d V| t  d <d S(   sņ   Control automatic evaluation

    This context manager controls whether or not all SymPy functions evaluate
    by default.

    Note that much of SymPy expects evaluated expressions.  This functionality
    is experimental and is unlikely to function as intended on large
    expressions.

    Examples
    ========

    >>> from sympy.abc import x
    >>> from sympy.core.evaluate import evaluate
    >>> print(x + x)
    2*x
    >>> with evaluate(False):
    ...     print(x + x)
    x + x
    i    N(   t   global_evaluate(   t   xt   old(    (    s2   lib/python2.7/site-packages/sympy/core/evaluate.pyt   evaluate   s    

c         c   s'   t  d } |  t  d <d V| t  d <d S(   sē   Control automatic distribution of Number over Add

    This context manager controls whether or not Mul distribute Number over
    Add. Plan is to avoid distributing Number over Add in all of sympy. Once
    that is done, this contextmanager will be removed.

    Examples
    ========

    >>> from sympy.abc import x
    >>> from sympy.core.evaluate import distribute
    >>> print(2*(x + 1))
    2*x + 2
    >>> with distribute(False):
    ...     print(2*(x + 1))
    2*(x + 1)
    i    N(   t   global_distribute(   R   R   (    (    s2   lib/python2.7/site-packages/sympy/core/evaluate.pyt
   distribute0   s    

N(   t   cacheR    t
   contextlibR   t   listR   t   TrueR   R   R   R   (    (    (    s2   lib/python2.7/site-packages/sympy/core/evaluate.pyt   <module>   s   	