MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/proc/2/task/2/root/usr/lib/python2.4/site-packages/dns/set.pyc
mò
!`Nc@s dZdefd„ƒYZdS(sA simple Set class.tSetcBsLtZdZdgZed„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d „Z#d!„Z$d"„Z%d#„Z&RS($s'A simple set class.

    Sets are not in Python until 2.3, and rdata are not immutable so
    we cannot use sets.Set anyway.  This class implements subset of
    the 2.3 Set interface using a list as the container.

    @ivar items: A list of the items which are in the set
    @type items: listtitemscCs<g|_|dj	o"x|D]}|i|ƒqWndS(svInitialize the set.

        @param items: the initial set of items
        @type items: any iterable or None
        N(tselfRtNonetitemtadd(RRR((t+/usr/lib/python2.4/site-packages/dns/set.pyt__init__s	
cCsdt|iƒS(Nsdns.simpleset.Set(%s)(treprRR(R((Rt__repr__*scCs(||ijo|ii|ƒndS(sAdd an item to the set.N(RRRtappend(RR((RR-scCs|ii|ƒdS(sRemove an item from the set.N(RRtremoveR(RR((RR2scCs.y|ii|ƒWntj
onXdS(s'Remove an item from the set if present.N(RRRRt
ValueError(RR((Rtdiscard6s
cCs.|i}|i|ƒ}t|iƒ|_|S(sÞ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.
        N(Rt	__class__tclst__new__tobjtlistR(RRR((Rt_clone=s
	cCs
|iƒS(s!Make a (shallow) copy of the set.N(RR(R((Rt__copy__OscCs
|iƒS(s!Make a (shallow) copy of the set.N(RR(R((RtcopySscCsZt|tƒptdƒ‚n||jodSnx|iD]}|i|ƒq?WdS(sÌUpdate the set, adding any elements from other which are not
        already in the set.
        @param other: the collection of items with which to update the set
        @type other: Set object
        sother must be a Set instanceN(t
isinstancetotherRRRRRR(RRR((Rtunion_updateWs

cCswt|tƒptdƒ‚n||jodSnx;t|iƒD]*}||ijo|ii|ƒqEqEWdS(sÈUpdate the set, removing any elements from other which are not
        in both sets.
        @param other: the collection of items with which to update the set
        @type other: Set object
        sother must be a Set instanceN(	RRRRRRRRR(RRR((Rtintersection_updateds
cCs_t|tƒptdƒ‚n||jo
g|_n"x|iD]}|i|ƒqDWdS(sÂUpdate the set, removing any elements from other which are in
        the set.
        @param other: the collection of items with which to update the set
        @type other: Set object
        sother must be a Set instanceN(RRRRRRRR
(RRR((Rtdifference_updatets


cCs|iƒ}|i|ƒ|S(s³Return a new set which is the union of I{self} and I{other}.

        @param other: the other set
        @type other: Set object
        @rtype: the same type as I{self}
        N(RRRRR(RRR((Rtunion‚s
cCs|iƒ}|i|ƒ|S(sºReturn a new set which is the intersection of I{self} and I{other}.

        @param other: the other set
        @type other: Set object
        @rtype: the same type as I{self}
        N(RRRRR(RRR((RtintersectionŽs
cCs|iƒ}|i|ƒ|S(sãReturn a new set which I{self} - I{other}, i.e. the items
        in I{self} which are not also in I{other}.

        @param other: the other set
        @type other: Set object
        @rtype: the same type as I{self}
        N(RRRRR(RRR((Rt
differencešs
cCs
|i|ƒS(N(RRR(RR((Rt__or__§scCs
|i|ƒS(N(RRR(RR((Rt__and__ªscCs
|i|ƒS(N(RRR(RR((Rt__add__­scCs
|i|ƒS(N(RRR(RR((Rt__sub__°scCs|i|ƒ|S(N(RRR(RR((Rt__ior__³s
cCs|i|ƒ|S(N(RRR(RR((Rt__iand__·s
cCs|i|ƒ|S(N(RRR(RR((Rt__iadd__»s
cCs|i|ƒ|S(N(RRR(RR((Rt__isub__¿s
cCs"x|D]}|i|ƒqWdS(sÊUpdate the set, adding any elements from other which are not
        already in the set.
        @param other: the collection of items with which to update the set
        @type other: any iterable typeN(RRRR(RRR((RtupdateÃscCs
g|_dS(sMake the set empty.N(RR(R((RtclearËscCs\x)|iD]}||ijotSq
q
Wx)|iD]}||ijotSq6q6WtS(N(RRRRtFalsetTrue(RRR((Rt__eq__Ïs

cCs|i|ƒS(N(RR*R(RR((Rt__ne__ÚscCs
t|iƒS(N(tlenRR(R((Rt__len__ÝscCs
t|iƒS(N(titerRR(R((Rt__iter__àscCs|i|S(N(RRti(RR0((Rt__getitem__ãscCs|i|=dS(N(RRR0(RR0((Rt__delitem__æscCs|i||!S(N(RRR0tj(RR0R3((Rt__getslice__éscCs|i||5dS(N(RRR0R3(RR0R3((Rt__delslice__ìscCsPt|tƒptdƒ‚nx)|iD]}||ijotSq*q*WtS(s?Is I{self} a subset of I{other}?

        @rtype: bool
        sother must be a Set instanceN(	RRRRRRRR(R)(RRR((Rtissubsetïs
cCsPt|tƒptdƒ‚nx)|iD]}||ijotSq*q*WtS(sAIs I{self} a superset of I{other}?

        @rtype: bool
        sother must be a Set instanceN(	RRRRRRRR(R)(RRR((Rt
issupersetüs
('t__name__t
__module__t__doc__t	__slots__RRR	RRR
RRRRRRRRRRRR R!R"R#R$R%R&R'R*R+R-R/R1R2R4R5R6R7(((RRsH									
					
																			
N(R:tobjectR(R((Rt?s