K i"dZddZddZddZy)c`dd}|syd}|ddD] }|||z }|||ddz }|S)z Prettyprints systems of nodes. Examples ======== >>> from sympy.printing.tree import pprint_nodes >>> print(pprint_nodes(["a", "b1\nb2", "c"])) +-a +-b1 | b2 +-c c|jd}d|dz}|ddD]}|dk(r |dk(r |d|zz }|d|zz } |S)N z+-%s z| %s z %s )split)stypexras Y/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/printing/tree.pyindentzpprint_nodes..indentse GGDM qtO12 "ABwqyX\!X\!  "rN)r)subtreesrfr s r pprint_nodesrsP   A cr] VAY a  A Hrc|jjdt|d}|r |j}nd}|r#t |D]}||}| ||d|dz }|S)z Returns information about the "node". This includes class name, string representation and assumptions. Parameters ========== assumptions : bool, optional See the ``assumptions`` keyword in ``tree`` z: rN) __class____name__str _assumptionssorted)node assumptionsr dr vs r print_noder!$slnn--s4y9A     %A!Ay q!$ $A  % Hrcg}|jD]}|jt|| t||t |z}|S)aT Returns a tree representation of "node" as a string. It uses print_node() together with pprint_nodes() on node.args recursively. Parameters ========== assumptions : bool, optional The flag to decide whether to print out all the assumption data (such as ``is_integer`, ``is_real``) associated with the expression or not. Enabling the flag makes the result verbose, and the printed result may not be deterministic because of the randomness used in backtracing the assumptions. See Also ======== print_tree r)argsappendtreer!r)rrrargr s rr&r&AsJ0Hyy<Sk:;<4[1L4JJA Hrc0tt||y)a Prints a tree representation of "node". Parameters ========== assumptions : bool, optional The flag to decide whether to print out all the assumption data (such as ``is_integer`, ``is_real``) associated with the expression or not. Enabling the flag makes the result verbose, and the printed result may not be deterministic because of the randomness used in backtracing the assumptions. Examples ======== >>> from sympy.printing import print_tree >>> from sympy import Symbol >>> x = Symbol('x', odd=True) >>> y = Symbol('y', even=True) Printing with full assumptions information: >>> print_tree(y**x) Pow: y**x +-Symbol: y | algebraic: True | commutative: True | complex: True | even: True | extended_real: True | finite: True | hermitian: True | imaginary: False | infinite: 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 extended_nonzero: True extended_real: True finite: True hermitian: True imaginary: False infinite: False integer: True irrational: False noninteger: False nonzero: True odd: True rational: True real: True transcendental: False zero: False Hiding the assumptions: >>> print_tree(y**x, assumptions=False) Pow: y**x +-Symbol: y +-Symbol: x See Also ======== tree r#N)printr&)rrs r print_treer*`s^ $t -.rN)T)rr!r&r*rrrr+s  F : >O/r