Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/dns/__pycache__/set.cpython-312.pyc

102 lines
12 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
g<> i<>#<00><00> <00>ddlZGd<02>d<03>Zy)<04>Nc<00><><00>eZdZdZdgZd*d<04>Zd<05>Zd<06>Zd<07>Zd<08>Z d <09>Z
d+d
<EFBFBD>Z d <0B>Z d <0C>Z d <0A>Zd<0E>Zd<0F>Zd<10>Zd<11>Zd<12>Zd<13>Zd<14>Zd<15>Zd<16>Zd<17>Zd<18>Zd<19>Zd<1A>Zd<1B>Zd<1C>Zd<1D>Zd<1E>Zd<1F>Z d <20>Z!d!<21>Z"d"<22>Z#d#<23>Z$d$<24>Z%d%<25>Z&d&<26>Z'd'<27>Z(d(<28>Z)d)<29>Z*y),<2C>Seta<74>A simple set class.
This class was originally used to deal with python not having a set class, and
originally the class used lists in its implementation. The ordered and indexable
nature of RRsets and Rdatasets is unfortunately widely used in dnspython
applications, so for backwards compatibility sets continue to be a custom class, now
based on an ordered dictionary.
<20>itemsNc<00>X<00>t<00>|_|<01>|D]}|j|<02><00>yy)zaInitialize the set.
*items*, an iterable or ``None``, the initial set of items.
N)<03>dictr<00>add)<03>selfr<00>items <20>6E:\Project\pygoedge\.venv\Lib\site-packages\dns/set.py<70>__init__z Set.__init__!s/<00><00> <1A>V<EFBFBD><04>
<EFBFBD> <10> <1C><1D><04><15><08><08><14><0E><1E> <1D>c<00>b<00>dtt|jj<00><00><00><00>d<02>S)Nz dns.set.Set(<28>))<04>repr<70>listr<00>keys<79>r s r <00>__repr__z Set.__repr__.s'<00><00><1D>d<EFBFBD>4<EFBFBD><04>
<EFBFBD>
<EFBFBD><0F><0F>(9<>#:<3A>;<3B><<3C>A<EFBFBD>><3E>>r c<00>@<00>||jvrd|j|<yy)zAdd an item to the set.N<>r<00>r r
s r rzSet.add1s#<00><00> <10>t<EFBFBD>z<EFBFBD>z<EFBFBD> !<21>#<23>D<EFBFBD>J<EFBFBD>J<EFBFBD>t<EFBFBD> <1C> "r c<00>F<00> |j|=y#t$rt<00>wxYw)zRemove an item from the set.N)r<00>KeyError<6F>
ValueErrorrs r <00>removez
Set.remove7s(<00><00> <1D><14>
<EFBFBD>
<EFBFBD>4<EFBFBD> <20><><17> <1D><1C> <1C> <1D>s<00> <00> c<00><<00>|jj|d<01>y)z'Remove an item from the set if present.N)r<00>poprs r <00>discardz Set.discard?s<00><00> <0A>
<EFBFBD>
<EFBFBD><0E><0E>t<EFBFBD>T<EFBFBD>"r c<00>@<00>|jj<00>\}}|S)z&Remove an arbitrary item from the set.)r<00>popitem)r <00>k<>_s r rzSet.popDs<00><00><15><1A><1A>#<23>#<23>%<25><06><11>A<EFBFBD><10>r c<00><><00>t|d<01>r |j}n |j}|j|<01>}t <00>|_|j
j |j
<00>|S)a<>Make a (shallow) copy of the set.
There is a 'clone protocol' that subclasses of this class
should use. To make a copy, first call your super's _clone()
method, and use the object returned as the new instance. Then
make shallow copies of the attributes defined in the subclass.
This protocol allows us to write the set algorithms that
return new instances (e.g. union) once, and keep using them in
subclasses.
<20> _clone_class)<07>hasattrr$<00> __class__<5F>__new__rr<00>update)r <00>cls<6C>objs r <00>_clonez
Set._cloneIsT<00><00> <13>4<EFBFBD><1E> (<28><16>#<23>#<23>C<EFBFBD><16>.<2E>.<2E>C<EFBFBD><11>k<EFBFBD>k<EFBFBD>#<23><1E><03><18>F<EFBFBD><03> <09> <0B> <09> <09><18><18><14><1A><1A>$<24><12>
r c<00>"<00>|j<00>S<00>z!Make a (shallow) copy of the set.<2E>r+rs r <00>__copy__z Set.__copy___<00><00><00><14>{<7B>{<7B>}<7D>r c<00>"<00>|j<00>Sr-r.rs r <00>copyzSet.copydr0r c<00><><00>t|t<00>s td<01><00>||ury|jD]}|j |<02><00>y)zaUpdate the set, adding any elements from other which are not
already in the set.
<20>other must be a Set instanceN)<05>
isinstancerrrr<00>r <00>otherr
s r <00> union_updatezSet.union_updateis=<00><00>
<1A>%<25><13>%<25><1C>;<3B><<3C> <<3C> <0F>5<EFBFBD>=<3D> <12><19>K<EFBFBD>K<EFBFBD>D<EFBFBD> <10>H<EFBFBD>H<EFBFBD>T<EFBFBD>N<EFBFBD> r c<00><><00>t|t<00>s td<01><00>||uryt|j<00>D]}||jvs<01>|j|=<00> y)z]Update the set, removing any elements from other which are not
in both sets.
r4N)r5rrrrr6s r <00>intersection_updatezSet.intersection_updateusQ<00><00>
<1A>%<25><13>%<25><1C>;<3B><<3C> <<3C> <0F>5<EFBFBD>=<3D> <12><19><14><1A><1A>$<24>D<EFBFBD><13>5<EFBFBD>;<3B>;<3B>&<26><18>J<EFBFBD>J<EFBFBD>t<EFBFBD>$<24>%r c<00><><00>t|t<00>s td<01><00>||ur|jj <00>y|jD]}|j |<02><00>y)zWUpdate the set, removing any elements from other which are in
the set.
r4N)r5rrr<00>clearrr6s r <00>difference_updatezSet.difference_update<74>sK<00><00>
<1A>%<25><13>%<25><1C>;<3B><<3C> <<3C> <0F>5<EFBFBD>=<3D> <10>J<EFBFBD>J<EFBFBD> <1C> <1C> <1E><1D> <0B> <0B><04><14> <0C> <0C>T<EFBFBD>"<22>$r c<00><><00>t|t<00>s td<01><00>||ur|jj <00>y|j |<01>}|j |<01>|j|<02>y)z<Update the set, retaining only elements unique to both sets.r4N)r5rrrr<<00> intersectionr8r=)r r7<00>overlaps r <00>symmetric_difference_updatezSet.symmetric_difference_update<74>s]<00><00><1A>%<25><13>%<25><1C>;<3B><<3C> <<3C> <0F>5<EFBFBD>=<3D> <10>J<EFBFBD>J<EFBFBD> <1C> <1C> <1E><1A>'<27>'<27><05>.<2E>G<EFBFBD> <10> <1D> <1D>e<EFBFBD> $<24> <10> "<22> "<22>7<EFBFBD> +r c<00>H<00>|j<00>}|j|<01>|S)zwReturn a new set which is the union of ``self`` and ``other``.
Returns the same Set type as this set.
)r+r8<00>r r7r*s r <00>unionz Set.union<6F>s"<00><00> <13>k<EFBFBD>k<EFBFBD>m<EFBFBD><03> <0B><18><18><15><1F><12>
r c<00>H<00>|j<00>}|j|<01>|S)z<>Return a new set which is the intersection of ``self`` and
``other``.
Returns the same Set type as this set.
)r+r:rCs r r?zSet.intersection<6F>s"<00><00><13>k<EFBFBD>k<EFBFBD>m<EFBFBD><03> <0B><1F><1F><05>&<26><12>
r c<00>H<00>|j<00>}|j|<01>|S)z<>Return a new set which ``self`` - ``other``, i.e. the items
in ``self`` which are not also in ``other``.
Returns the same Set type as this set.
)r+r=rCs r <00>
differencezSet.difference<63>s"<00><00><13>k<EFBFBD>k<EFBFBD>m<EFBFBD><03> <0B><1D><1D>e<EFBFBD>$<24><12>
r c<00>H<00>|j<00>}|j|<01>|S)z<>Return a new set which (``self`` - ``other``) | (``other``
- ``self), ie: the items in either ``self`` or ``other`` which
are not contained in their intersection.
Returns the same Set type as this set.
)r+rArCs r <00>symmetric_differencezSet.symmetric_difference<63>s"<00><00><13>k<EFBFBD>k<EFBFBD>m<EFBFBD><03> <0B>'<27>'<27><05>.<2E><12>
r c<00>$<00>|j|<01>S<00>N<>rD<00>r r7s r <00>__or__z
Set.__or__<5F><00><00><00><13>z<EFBFBD>z<EFBFBD>%<25> <20> r c<00>$<00>|j|<01>SrK)r?rMs r <00>__and__z Set.__and__<5F>s<00><00><13> <20> <20><15>'<27>'r c<00>$<00>|j|<01>SrKrLrMs r <00>__add__z Set.__add__<5F>rOr c<00>$<00>|j|<01>SrK)rGrMs r <00>__sub__z Set.__sub__<5F>s<00><00><13><EFBFBD><EFBFBD>u<EFBFBD>%<25>%r c<00>$<00>|j|<01>SrK)rIrMs r <00>__xor__z Set.__xor__<5F>s<00><00><13>(<28>(<28><15>/<2F>/r c<00>(<00>|j|<01>|SrK<00>r8rMs r <00>__ior__z Set.__ior__<5F><00><00><00> <0C><19><19>%<25> <20><13> r c<00>(<00>|j|<01>|SrK)r:rMs r <00>__iand__z Set.__iand__<5F>s<00><00> <0C> <20> <20><15>'<27><13> r c<00>(<00>|j|<01>|SrKrYrMs r <00>__iadd__z Set.__iadd__<5F>r[r c<00>(<00>|j|<01>|SrK)r=rMs r <00>__isub__z Set.__isub__<5F>s<00><00> <0C><1E><1E>u<EFBFBD>%<25><13> r c<00>(<00>|j|<01>|SrK)rArMs r <00>__ixor__z Set.__ixor__<5F>s<00><00> <0C>(<28>(<28><15>/<2F><13> r c<00>4<00>|D]}|j|<02><00>y)z<>Update the set, adding any elements from other which are not
already in the set.
*other*, the collection of items with which to update the set, which
may be any iterable type.
N)rr6s r r(z
Set.update<74>s<00><00><1A>D<EFBFBD> <10>H<EFBFBD>H<EFBFBD>T<EFBFBD>N<EFBFBD>r c<00>8<00>|jj<00>y)zMake the set empty.N)rr<rs r r<z Set.clear<61>s<00><00> <0C>
<EFBFBD>
<EFBFBD><18><18>r c<00>4<00>|j|jk(SrKrrMs r <00>__eq__z
Set.__eq__<5F>s<00><00><13>z<EFBFBD>z<EFBFBD>U<EFBFBD>[<5B>[<5B>(<28>(r c<00>&<00>|j|<01> SrK)rgrMs r <00>__ne__z
Set.__ne__<5F>s<00><00><17>;<3B>;<3B>u<EFBFBD>%<25>%<25>%r c<00>,<00>t|j<00>SrK)<02>lenrrs r <00>__len__z Set.__len__s<00><00><12>4<EFBFBD>:<3A>:<3A><EFBFBD>r c<00>,<00>t|j<00>SrK)<02>iterrrs r <00>__iter__z Set.__iter__s<00><00><13>D<EFBFBD>J<EFBFBD>J<EFBFBD><1F>r c<00><00>t|t<00>rIttj|j
|j |j|j<00><00>Sttj|j
||dz<00><00>S)N<>)
r5<00>slicer<00> itertools<6C>islicer<00>start<72>stop<6F>step<65>next)r <00>is r <00> __getitem__zSet.__getitem__sZ<00><00> <15>a<EFBFBD><15> <1F><17> <09>(<28>(<28><14><1A><1A>Q<EFBFBD>W<EFBFBD>W<EFBFBD>a<EFBFBD>f<EFBFBD>f<EFBFBD>a<EFBFBD>f<EFBFBD>f<EFBFBD>M<>N<> N<><17> <09>(<28>(<28><14><1A><1A>Q<EFBFBD><01>A<EFBFBD><05>><3E>?<3F> ?r c<00><><00>t|t<00>r!t||<00>D]}|j|=<00>y|j||=yrK)r5rrrr)r ry<00>elts r <00> __delitem__zSet.__delitem__ s;<00><00> <15>a<EFBFBD><15> <1F><1B>D<EFBFBD><11>G<EFBFBD>}<7D><03><18>J<EFBFBD>J<EFBFBD>s<EFBFBD>O<EFBFBD>%<25><15>
<EFBFBD>
<EFBFBD>4<EFBFBD><01>7<EFBFBD>#r c<00>|<00>t|t<00>s td<01><00>|jD]}||jvs<01>yy)zFIs this set a subset of *other*?
Returns a ``bool``.
r4FT<46>r5rrrr6s r <00>issubsetz Set.issubsets<<00><00> <1A>%<25><13>%<25><1C>;<3B><<3C> <<3C><18>J<EFBFBD>J<EFBFBD>D<EFBFBD><13>5<EFBFBD>;<3B>;<3B>&<26><1C><1F>r c<00>|<00>t|t<00>s td<01><00>|jD]}||jvs<01>yy)zHIs this set a superset of *other*?
Returns a ``bool``.
r4FTrr6s r <00>
issupersetzSet.issuperset!s<<00><00> <1A>%<25><13>%<25><1C>;<3B><<3C> <<3C><19>K<EFBFBD>K<EFBFBD>D<EFBFBD><13>4<EFBFBD>:<3A>:<3A>%<25><1C> <20>r c<00>|<00>t|t<00>s td<01><00>|jD]}||jvs<01>yy)Nr4FTrr6s r <00>
isdisjointzSet.isdisjoint.s:<00><00><19>%<25><13>%<25><1C>;<3B><<3C> <<3C><19>K<EFBFBD>K<EFBFBD>D<EFBFBD><13>t<EFBFBD>z<EFBFBD>z<EFBFBD>!<21><1C> <20>r rK)<02>returnr)+<2B>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F> __slots__r rrrrrr+r/r2r8r:r=rArDr?rGrIrNrQrSrUrWrZr]r_rarcr(r<rgrirlrorzr}r<>r<>r<><00>r r rrs<><00><00><08><19> <09>I<EFBFBD> <1F>?<3F>$<24> <1D>#<23>
<11>
<13>,<1D>
<1D>
<1B> %<25> #<23>
,<2C><13> <13> <13>
<13>!<21>(<28>!<21>&<26>0<><14><14><14><14><14> <1B><1B>)<29>&<26><1F> <20>@<01> $<24> <14> <14>r r)rsrr<>r r <00><module>r<>s<00><01>$<11>_<14>_r