Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/utils/__pycache__/tree.cpython-312.pyc

52 lines
5.7 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> i*<00><00>0<00>dZddlZddlmZGd<04>d<05>Zy)zT
A class for storing a tree graph. Primarily used for filter constructs in the
ORM.
<EFBFBD>N)<01> make_hashablec<00>t<00>eZdZdZdZdd<04>Zedd<05><01>Zd<06>Zd<07>Z d<08>Z
e
Z d <09>Z d
<EFBFBD>Z d <0B>Zd <0C>Zd <0A>Zd<0E>Zd<0F>Zd<10>Zy)<12>Nodez<65>
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.
<20>DEFAULTNc<00>X<00>|r|ddng|_|xs |j|_||_y)z@Construct a new Node. If no connector is given, use the default.N)<04>children<65>default<6C> connector<6F>negated)<04>selfrr
r s <20>@E:\Project\pygoedge\.venv\Lib\site-packages\django/utils/tree.py<70>__init__z Node.__init__s(<00><00>'/<2F><08><11> <0B>R<EFBFBD><04> <0A>"<22>2<>d<EFBFBD>l<EFBFBD>l<EFBFBD><04><0E><1E><04> <0C>c<00>J<00>t||xs |j|<03>}||_|S)a
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__().
)rr <00> __class__)<05>clsrr
r <00>objs r <00>createz Node.creates'<00><00><13>8<EFBFBD>Y<EFBFBD>5<>#<23>+<2B>+<2B>w<EFBFBD>?<3F><03><1B><03> <0A><12>
rc<00><><00>|jrdnd}||jdjd<04>|jD<00><00>fzS)Nz(NOT (%s: %s))z(%s: %s)z, c3<00>2K<00>|]}t|<01><00><01><00>y<00>w<01>N)<01>str)<02>.0<EFBFBD>cs r <00> <genexpr>zNode.__str__.<locals>.<genexpr>*s<00><00><><00>4S<34>]<5D><01>S<EFBFBD><11>V<EFBFBD>]<5D>s<00>)r r
<00>joinr)r <00>templates r <00>__str__z Node.__str__(s7<00><00>'+<2B>|<7C>|<7C>#<23><1A><08><17>4<EFBFBD>><3E>><3E>4<EFBFBD>9<EFBFBD>9<EFBFBD>4S<34>T<EFBFBD>]<5D>]<5D>4S<34>+S<>T<>T<>Trc<00><<00>d|jj<00>d|<00>d<03>S)N<><z: <20>>)r<00>__name__<5F>r s r <00>__repr__z Node.__repr__,s<00><00>!<21>^<5E>^<5E>4<>4<>d<EFBFBD>;<3B>;rc<00>v<00>|j|j|j<00><01>}|j|_|S<00>N)r
r )rr
r r)r rs r <00>__copy__z Node.__copy__/s,<00><00><12>k<EFBFBD>k<EFBFBD>D<EFBFBD>N<EFBFBD>N<EFBFBD>D<EFBFBD>L<EFBFBD>L<EFBFBD>k<EFBFBD>I<><03><1B>}<7D>}<7D><03> <0C><12>
rc<00><><00>|j|j|j<00><01>}tj|j
|<01>|_|Sr&)rr
r <00>copy<70>deepcopyr)r <00>memodictrs r <00> __deepcopy__zNode.__deepcopy__6s7<00><00><12>k<EFBFBD>k<EFBFBD>D<EFBFBD>N<EFBFBD>N<EFBFBD>D<EFBFBD>L<EFBFBD>L<EFBFBD>k<EFBFBD>I<><03><1B>}<7D>}<7D>T<EFBFBD>]<5D>]<5D>H<EFBFBD>=<3D><03> <0C><12>
rc<00>,<00>t|j<00>S)z,Return the number of children this node has.)<02>lenrr#s r <00>__len__z Node.__len__;s<00><00><12>4<EFBFBD>=<3D>=<3D>!<21>!rc<00>,<00>t|j<00>S)z-Return whether or not this node has children.)<02>boolrr#s r <00>__bool__z Node.__bool__?s<00><00><13>D<EFBFBD>M<EFBFBD>M<EFBFBD>"<22>"rc<00><00>||jvS)z:Return True if 'other' is a direct child of this instance.)r<00>r <00>others r <00> __contains__zNode.__contains__Cs<00><00><14><04> <0A> <0A>%<25>%rc<00><><00>|j|jk(xrO|j|jk(xr4|j|jk(xr|j|jk(Sr)rr
r rr4s r <00>__eq__z Node.__eq__GsX<00><00> <10>N<EFBFBD>N<EFBFBD>e<EFBFBD>o<EFBFBD>o<EFBFBD> -<2D> 0<><14><0E><0E>%<25>/<2F>/<2F>1<> 0<><14> <0C> <0C><05> <0A> <0A>-<2D> 0<><15> <0A> <0A><15><1E><1E>/<2F> 
rc<00><><00>t|j|j|jgt |j
<00><00><01><06>Sr)<06>hashrr
r rrr#s r <00>__hash__z Node.__hash__Os<<00><00><13><14><0E><0E><14><0E><0E><14> <0C> <0C> <0E><1F>t<EFBFBD>}<7D>}<7D>-<2D>  <0E>
<EFBFBD>
rc<00>^<00>|j|k7r"|j<00>}||_||g|_|St|t<00>rP|j
sD|j|k(st |<01>dk(r'|jj|j<00>|S|jj|<01>|S)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.
<20>) r
r)r<00>
isinstancerr r.<00>extend<6E>append)r <00>data<74> conn_typers r <00>addzNode.addYs<><00><00> <10>><3E>><3E>Y<EFBFBD> &<26><16>)<29>)<29>+<2B>C<EFBFBD>&<26>D<EFBFBD>N<EFBFBD> <20>$<24>K<EFBFBD>D<EFBFBD>M<EFBFBD><17>K<EFBFBD> <16>t<EFBFBD>T<EFBFBD> "<22><18>L<EFBFBD>L<EFBFBD><15><1E><1E>9<EFBFBD>,<2C><03>D<EFBFBD> <09>Q<EFBFBD><0E> <11>M<EFBFBD>M<EFBFBD> <20> <20><14><1D><1D> /<2F><17>K<EFBFBD> <11>M<EFBFBD>M<EFBFBD> <20> <20><14> &<26><17>Krc<00>(<00>|j |_y)z'Negate the sense of the root connector.N)r r#s r <00>negatez Node.negate|s<00><00><1F><<3C><<3C>'<27><04> r)NNF)r"<00>
__module__<EFBFBD> __qualname__<5F>__doc__r r<00> classmethodrrr$r'r)r,r/r2r6r8r;rCrE<00>rr rr sg<00><00><08><18>G<EFBFBD><1F> <11> <13><11> <13>U<01><<3C><13>
<14>D<EFBFBD><13>
"<22>#<23>&<26>
<EFBFBD>
<EFBFBD>!<18>F(rr)rHr)<00>django.utils.hashablerrrJrr <00><module>rLs<00><01><04>
 <0C>/<2F>s(<28>s(r