+
    Tj*                     2    R t ^ RIt^ RIHt  ! R R4      tR# )zT
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
N)make_hashablec                      a  ] tR t^t o RtRtRR lt]RR l4       tR t	R t
R t]tR	 tR
 tR tR tR tR tR tR tRtV tR# )Nodez
A single internal node in the tree graph. A Node should be viewed as a
connection (the root) with the children being either leaf nodes or other
Node instances.
DEFAULTNc                x    V'       d
   VR,          M. V n         T;'       g    V P                  V n        W0n        R# )z@Construct a new Node. If no connector is given, use the default.:NNNN)childrendefault	connectornegated)selfr   r	   r
   s   &&&&F/var/www/idalgo/venv/lib/python3.14/site-packages/django/utils/tree.py__init__Node.__init__   s)    '/R"22dll    c                R    \        Y;'       g    V P                  V4      pWn        V# )z
Create a new instance using Node() instead of __init__() as some
subclasses, e.g. django.db.models.query_utils.Q, may implement a custom
__init__() with a signature that conflicts with the one defined in
Node.__init__().
)r   r   	__class__)clsr   r	   r
   objs   &&&& r   createNode.create   s&     855#++w?
r   c                    V P                   '       d   R MRpWP                  RP                  R V P                   4       4      3,          # )z(NOT (%s: %s))z(%s: %s)z, c              3   8   "   T F  p\        V4      x  K  	  R # 5iN)str).0cs   & r   	<genexpr>Node.__str__.<locals>.<genexpr>*   s     4S]SVV]s   )r
   r	   joinr   )r   templates   & r   __str__Node.__str__(   s7    '+|||#>>4994ST]]4S+STTTr   c                @    R V P                   P                  : RV : R2# )<z: >)r   __name__r   s   &r   __repr__Node.__repr__,   s    !^^44d;;r   c                v    V P                  V P                  V P                  R 7      pV P                  Vn        V# )r	   r
   )r   r	   r
   r   )r   r   s   & r   __copy__Node.__copy__/   s,    kkDNNDLLkI}}
r   c                    V P                  V P                  V P                  R 7      p\        P                  ! V P
                  V4      Vn        V# r*   )r   r	   r
   copydeepcopyr   )r   memodictr   s   && r   __deepcopy__Node.__deepcopy__6   s7    kkDNNDLLkI}}T]]H=
r   c                ,    \        V P                  4      # )z,Return the number of children this node has.)lenr   r&   s   &r   __len__Node.__len__;   s    4==!!r   c                ,    \        V P                  4      # )z-Return whether or not this node has children.)boolr   r&   s   &r   __bool__Node.__bool__?   s    DMM""r   c                    WP                   9   # )z:Return True if 'other' is a direct child of this instance.)r   r   others   &&r   __contains__Node.__contains__C   s    %%r   c                    V P                   VP                   8H  ;'       d\    V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r   )r   r	   r
   r   r<   s   &&r   __eq__Node.__eq__G   sg    NNeoo- 0 0%//10 0-0 0 /		
r   c                    \        V P                  V P                  V P                  .\	        V P
                  4      O54      # r   )hashr   r	   r
   r   r   r&   s   &r   __hash__Node.__hash__O   s<     t}}-	
 	
r   c                ~   V P                   V8w  d!   V P                  4       pW n         W1.V n        V# \        V\        4      '       d[   VP
                  '       gI   VP                   V8X  g   \        V4      ^8X  d(   V P                  P                  VP                  4       V # V P                  P                  V4       V# )a{  
Combine this tree and the data represented by data using the
connector conn_type. The combine is done by squashing the node other
away if possible.

This tree (self) will never be pushed to a child node of the
combined tree, nor will the connector or negated properties change.

Return a node which can be used in place of data regardless if the
node other got squashed or not.
)	r	   r.   r   
isinstancer   r
   r4   extendappend)r   data	conn_typer   s   &&& r   addNode.addY   s     >>Y&))+C&N KDMKtT""LLL9,D	Q MM  /K MM  &Kr   c                2    V P                   '       * V n         R# )z'Negate the sense of the root connector.N)r
   r&   s   &r   negateNode.negate|   s    <<'r   )r   r	   r
   )NNF)r%   
__module____qualname____firstlineno____doc__r   r   classmethodr   r    r'   r+   r.   r1   r5   r9   r>   rA   rE   rM   rP   __static_attributes____classdictcell__)__classdict__s   @r   r   r      so      G 	 	U<
 D
"#&

!F( (r   r   )rU   r.   django.utils.hashabler   r    r   r   <module>r\      s   
  /s( s(r   