ó
”¼\c           @  s>   d  d l  m Z m Z d   Z d   Z d   Z d   Z d S(   i’’’’(   t   print_functiont   divisionc         C  s\   d d  } |  s d Sd } x" |  d  D] } | | |  7} q' W| | |  d d  7} | S(   sĪ   
    Prettyprints systems of nodes.

    Examples
    ========

    >>> from sympy.printing.tree import pprint_nodes
    >>> print(pprint_nodes(["a", "b1\nb2", "c"]))
    +-a
    +-b1
    | b2
    +-c

    i   c         S  ss   |  j  d  } d | d } xO | d D]C } | d k r@ q( n  | d k r] | d | 7} q( | d | 7} q( W| S(   Ns   
s   +-%s
i    i   t    s   | %s
s     %s
(   t   split(   t   st   typet   xt   rt   a(    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyt   indent   s    R   i’’’’i   (    (   t   subtreesR	   t   fR   (    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyt   pprint_nodes   s    c         C  sy   d |  j  j t |   f } |  j } | ru xG t |  D]6 } | | } | d k rZ q8 n  | d | | f 7} q8 Wn  | S(   su   
    Returns information about the "node".

    This includes class name, string representation and assumptions.
    s   %s: %s
N(   t	   __class__t   __name__t   strt   _assumptionst   sortedt   None(   t   nodeR   t   dR   t   v(    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyt
   print_node'   s    	
c         C  sG   g  } x$ |  j  D] } | j t |   q Wt |   t |  } | S(   s»   
    Returns a tree representation of "node" as a string.

    It uses print_node() together with pprint_nodes() on node.args recursively.

    See Also
    ========

    print_tree

    (   t   argst   appendt   treeR   R   (   R   R
   t   argR   (    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyR   8   s
    c         C  s   t  t |    d S(   s¢  
    Prints a tree representation of "node".

    Examples
    ========

    >>> from sympy.printing import print_tree
    >>> from sympy import Symbol
    >>> x = Symbol('x', odd=True)
    >>> y = Symbol('y', even=True)
    >>> print_tree(y**x)
    Pow: y**x
    +-Symbol: y
    | algebraic: True
    | commutative: True
    | complex: True
    | even: True
    | hermitian: True
    | imaginary: False
    | integer: True
    | irrational: False
    | noninteger: False
    | odd: False
    | rational: True
    | real: True
    | transcendental: False
    +-Symbol: x
      algebraic: True
      commutative: True
      complex: True
      even: False
      hermitian: True
      imaginary: False
      integer: True
      irrational: False
      noninteger: False
      nonzero: True
      odd: True
      rational: True
      real: True
      transcendental: False
      zero: False

    See Also
    ========

    tree

    N(   t   printR   (   R   (    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyt
   print_treeK   s    2N(   t
   __future__R    R   R   R   R   R   (    (    (    s2   lib/python2.7/site-packages/sympy/printing/tree.pyt   <module>   s   	#		