????
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/guppy/gsl/__pycache__/DottedTree.cpython-311.pyc |
� ��y}8dy� �R � d Z G d� de� � Z G d� d� � Zd� Zd� Zd� ZdS ) a� Handling of tree structures given in a special 'dotted' syntax. This represents trees of nodes with strings as tags, in a readable and writable and easy to parse syntax. There are two main functions, unparse_sexpr and parse_string. When parsing, the result is by default given in 'sexpr' format: each node is a tuple of the form (tag, ) or (tag, node) or (tag, node, node) ... The following invariant is intended to hold for every node x, parse_string(unparse_sexpr(x)) == x Currently the following invariant has been tested for some strings: unparse_sexpr(parse_string(s)).strip() == s.strip() [It only holds on stripped results but may be fixed sometime.] c �$ � e Zd ZdZd� Zd� Zd� ZdS )�Node��tag�children�indexc �0 � || _ || _ || _ d S �Nr )�selfr r r s �g/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/guppy/gsl/DottedTree.py�__init__z Node.__init__ s � ���� �� ��� � � � c �P � | j ft d� | j D � � � � z S )Nc �6 � g | ]}|� � � ��S � )�as_sexpr)�.0�cs r � <listcomp>z!Node.as_sexpr.<locals>.<listcomp>"