Prv8 Shell
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4
System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64
User : jackjohn ( 502)
PHP Version : 5.3.17
Disable Function : NONE
Directory :  /usr/lib64/python2.6/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.6/sets.pyo
Ñò
§ÚêLc@s©dZddklZlZdddgZddkZeidedd	ƒdefd
„ƒYZ	de	fd„ƒYZ
de	fd„ƒYZd
e	fd„ƒYZdS(såClasses to represent arbitrary sets (including sets of sets).

This module implements sets using dictionaries whose values are
ignored.  The usual operations (union, intersection, deletion, etc.)
are provided as both methods and operators.

Important: sets are not sequences!  While they support 'x in s',
'len(s)', and 'for x in s', none of those operations are unique for
sequences; for example, mappings support all three as well.  The
characteristic operation for sequences is subscripting with small
integers: s[i], for i in range(len(s)).  Sets don't support
subscripting at all.  Also, sequences allow multiple occurrences and
their elements have a definite order; sets on the other hand don't
record multiple occurrences and don't remember the order of element
insertion (which is why they don't support s[i]).

The following classes are provided:

BaseSet -- All the operations common to both mutable and immutable
    sets. This is an abstract class, not meant to be directly
    instantiated.

Set -- Mutable sets, subclass of BaseSet; not hashable.

ImmutableSet -- Immutable sets, subclass of BaseSet; hashable.
    An iterable argument is mandatory to create an ImmutableSet.

_TemporarilyImmutableSet -- A wrapper around a Set, hashable,
    giving the same hash value as the immutable set equivalent
    would have.  Do not use this class directly.

Only hashable objects can be added to a Set. In particular, you cannot
really add a Set as an element to another Set; if you try, what is
actually added is an ImmutableSet built from it (it compares equal to
the one you tried adding).

When you ask if `x in y' where x is a Set and y is a Set or
ImmutableSet, x is wrapped into a _TemporarilyImmutableSet z, and
what's tested is actually `z in y'.

iÿÿÿÿ(tifiltertifilterfalsetBaseSettSettImmutableSetNsthe sets module is deprecatedt
stacklevelicBs"eZdZdgZd„Zd„Zd„ZeZed„Z	d„Z
d„Zd„Zd	„Z
d
„ZeZd„Zd„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZeZeZd„Zd„ZdZ!d„Z"d„Z#d„Z$RS(s1Common base class for mutable and immutable sets.t_datacCs!|itjo
td‚ndS(sThis is an abstract class.s7BaseSet is an abstract class.  Use Set or ImmutableSet.N(t	__class__Rt	TypeError(tself((s/usr/lib64/python2.6/sets.pyt__init__HscCs
t|iƒS(s'Return the number of elements of a set.(tlenR(R	((s/usr/lib64/python2.6/sets.pyt__len__QscCs
|iƒS(seReturn string representation of a set.

        This looks like 'Set([<list of elements>])'.
        (t_repr(R	((s/usr/lib64/python2.6/sets.pyt__repr__UscCs8|iiƒ}|o|iƒnd|ii|fS(Ns%s(%r)(RtkeystsortRt__name__(R	tsortedtelements((s/usr/lib64/python2.6/sets.pyR
_scCs
|iiƒS(ssReturn an iterator over the elements or a set.

        This is the keys iterator for the underlying dict.
        (Rtiterkeys(R	((s/usr/lib64/python2.6/sets.pyt__iter__escCs
td‚dS(Nscan't compare sets using cmp()(R(R	tother((s/usr/lib64/python2.6/sets.pyt__cmp__qscCs)t|tƒo|i|ijStSdS(N(t
isinstanceRRtFalse(R	R((s/usr/lib64/python2.6/sets.pyt__eq__ƒscCs)t|tƒo|i|ijStSdS(N(RRRtTrue(R	R((s/usr/lib64/python2.6/sets.pyt__ne__‰scCs#|iƒ}|ii|iƒ|S(sReturn a shallow copy of a set.(RRtupdate(R	tresult((s/usr/lib64/python2.6/sets.pytcopy‘scCscddkl}|iƒ}||t|ƒ<|i}t}x!|D]}|||||ƒ<qBW|S(s1Return a deep copy of a set; used by copy module.iÿÿÿÿ(tdeepcopy(RR RtidRR(R	tmemoR Rtdatatvaluetelt((s/usr/lib64/python2.6/sets.pyt__deepcopy__™s	cCs"t|tƒptS|i|ƒS(shReturn the union of two sets as a new set.

        (I.e. all elements that are in either set.)
        (RRtNotImplementedtunion(R	R((s/usr/lib64/python2.6/sets.pyt__or__²scCs |i|ƒ}|i|ƒ|S(shReturn the union of two sets as a new set.

        (I.e. all elements that are in either set.)
        (Rt_update(R	RR((s/usr/lib64/python2.6/sets.pyR(»s
cCs"t|tƒptS|i|ƒS(snReturn the intersection of two sets as a new set.

        (I.e. all elements that are in both sets.)
        (RRR'tintersection(R	R((s/usr/lib64/python2.6/sets.pyt__and__ÄscCsyt|tƒpt|ƒ}nt|ƒt|ƒjo||}}n||}}t|ii|ƒ}|i|ƒS(snReturn the intersection of two sets as a new set.

        (I.e. all elements that are in both sets.)
        (RRRRRRt__contains__R(R	Rtlittletbigtcommon((s/usr/lib64/python2.6/sets.pyR+Ís
cCs"t|tƒptS|i|ƒS(s„Return the symmetric difference of two sets as a new set.

        (I.e. all elements that are in exactly one of the sets.)
        (RRR'tsymmetric_difference(R	R((s/usr/lib64/python2.6/sets.pyt__xor__Ûsc	Cs¨|iƒ}|i}t}|i}y
|i}Wn"tj
ot|ƒi}nXx$t|i|ƒD]}|||<qiWx$t|i|ƒD]}|||<qW|S(s„Return the symmetric difference of two sets as a new set.

        (I.e. all elements that are in exactly one of the sets.)
        (RRRtAttributeErrorRRR-(R	RRR#R$tselfdatat	otherdataR%((s/usr/lib64/python2.6/sets.pyR1äs		
cCs"t|tƒptS|i|ƒS(s€Return the difference of two sets as a new Set.

        (I.e. all elements that are in this set and not in the other.)
        (RRR't
difference(R	R((s/usr/lib64/python2.6/sets.pyt__sub__÷scCsx|iƒ}|i}y
|i}Wn"tj
ot|ƒi}nXt}x$t|i|ƒD]}|||<q`W|S(s€Return the difference of two sets as a new Set.

        (I.e. all elements that are in this set and not in the other.)
        (RRR3RRRR-(R	RRR#R5R$R%((s/usr/lib64/python2.6/sets.pyR6s	
cCs^y||ijSWnFtj
o:t|ddƒ}|djo‚n|ƒ|ijSXdS(s{Report whether an element is a member of a set.

        (Called in response to the expression `element in self'.)
        t__as_temporarily_immutable__N(RRtgetattrtNone(R	telementt	transform((s/usr/lib64/python2.6/sets.pyR-s
cCsP|i|ƒt|ƒt|ƒjotSxt|ii|ƒD]}tSWtS(s-Report whether another set contains this set.(t_binary_sanity_checkRRRRR-R(R	RR%((s/usr/lib64/python2.6/sets.pytissubset!s
cCsP|i|ƒt|ƒt|ƒjotSxt|ii|ƒD]}tSWtS(s-Report whether this set contains another set.(R=RRRRR-R(R	RR%((s/usr/lib64/python2.6/sets.pyt
issuperset*s
cCs3|i|ƒt|ƒt|ƒjo
|i|ƒS(N(R=RR>(R	R((s/usr/lib64/python2.6/sets.pyt__lt__7s
cCs3|i|ƒt|ƒt|ƒjo
|i|ƒS(N(R=RR?(R	R((s/usr/lib64/python2.6/sets.pyt__gt__;s
cCs!t|tƒp
td‚ndS(Ns,Binary operation only permitted between sets(RRR(R	R((s/usr/lib64/python2.6/sets.pyR=DscCs+d}x|D]}|t|ƒN}q
W|S(Ni(thash(R	RR%((s/usr/lib64/python2.6/sets.pyt
_compute_hashJs
cCsG|i}t|tƒo|i|iƒdSt}t|ƒtttfjo‹t	|ƒ}xätopy#x|D]}|||<qpWdSWq_t
j
o:t|ddƒ}|djo‚n|||ƒ<q_Xq_Wnixe|D]]}y|||<Wqât
j
o:t|ddƒ}|djo‚n|||ƒ<qâXqâWdS(Nt__as_immutable__(
RRRRRttypetlistttupletxrangetiterRR9R:(R	titerableR#R$titR;R<((s/usr/lib64/python2.6/sets.pyR*Us8	

N(%Rt
__module__t__doc__t	__slots__R
RRt__str__RR
RRRRRt__copy__R&R)R(R,R+R2R1R7R6R-R>R?t__le__t__ge__R@RAR:t__hash__R=RCR*(((s/usr/lib64/python2.6/sets.pyRAsB																												
				cBs>eZdZdgZdd„Zd„Zd„Zd„ZRS(sImmutable set class.t	_hashcodecCs4d|_h|_|dj	o|i|ƒndS(s5Construct an immutable set from an optional iterable.N(R:RTRR*(R	RJ((s/usr/lib64/python2.6/sets.pyR
s		
cCs*|idjo|iƒ|_n|iS(N(RTR:RC(R	((s/usr/lib64/python2.6/sets.pyRSˆscCs|i|ifS(N(RRT(R	((s/usr/lib64/python2.6/sets.pyt__getstate__scCs|\|_|_dS(N(RRT(R	tstate((s/usr/lib64/python2.6/sets.pyt__setstate__sN(	RRLRMRNR:R
RSRURW(((s/usr/lib64/python2.6/sets.pyRzs			cBsÂeZdZgZdd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„Zd„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(s Mutable set class.cCs+h|_|dj	o|i|ƒndS(s*Construct a set from an optional iterable.N(RR:R*(R	RJ((s/usr/lib64/python2.6/sets.pyR
šs	
cCs
|ifS(N(R(R	((s/usr/lib64/python2.6/sets.pyRU scCs|\|_dS(N(R(R	R#((s/usr/lib64/python2.6/sets.pyRW¤scCs$|i|ƒ|ii|iƒ|S(s2Update a set with the union of itself and another.(R=RR(R	R((s/usr/lib64/python2.6/sets.pyt__ior__¬s
cCs|i|ƒdS(s2Update a set with the union of itself and another.N(R*(R	R((s/usr/lib64/python2.6/sets.pytunion_update²scCs!|i|ƒ||@i|_|S(s9Update a set with the intersection of itself and another.(R=R(R	R((s/usr/lib64/python2.6/sets.pyt__iand__¶s
cCs7t|tƒo||M}n|i|ƒi|_dS(s9Update a set with the intersection of itself and another.N(RRR+R(R	R((s/usr/lib64/python2.6/sets.pytintersection_update¼scCs|i|ƒ|i|ƒ|S(sAUpdate a set with the symmetric difference of itself and another.(R=tsymmetric_difference_update(R	R((s/usr/lib64/python2.6/sets.pyt__ixor__Ãs

cCs|i}t}t|tƒpt|ƒ}n||jo|iƒnx0|D](}||jo||=qQ|||<qQWdS(sAUpdate a set with the symmetric difference of itself and another.N(RRRRRtclear(R	RR#R$R%((s/usr/lib64/python2.6/sets.pyR\És	

cCs|i|ƒ|i|ƒ|S(s1Remove all elements of another set from this set.(R=tdifference_update(R	R((s/usr/lib64/python2.6/sets.pyt__isub__×s

cCsl|i}t|tƒpt|ƒ}n||jo|iƒnx!t|i|ƒD]
}||=qWWdS(s1Remove all elements of another set from this set.N(RRRRR^RR-(R	RR#R%((s/usr/lib64/python2.6/sets.pyR_Ýs	
cCs|i|ƒdS(s9Add all values from an iterable (such as a list or file).N(R*(R	RJ((s/usr/lib64/python2.6/sets.pyRéscCs|iiƒdS(s"Remove all elements from this set.N(RR^(R	((s/usr/lib64/python2.6/sets.pyR^íscCsayt|i|<WnItj
o=t|ddƒ}|djo‚nt|i|ƒ<nXdS(s`Add an element to a set.

        This has no effect if the element is already present.
        RDN(RRRR9R:(R	R;R<((s/usr/lib64/python2.6/sets.pytaddós
cCs[y|i|=WnFtj
o:t|ddƒ}|djo‚n|i|ƒ=nXdS(svRemove an element from a set; it must be a member.

        If the element is not a member, raise a KeyError.
        R8N(RRR9R:(R	R;R<((s/usr/lib64/python2.6/sets.pytremoves
cCs+y|i|ƒWntj
onXdS(smRemove an element from a set if it is a member.

        If the element is not a member, do nothing.
        N(RbtKeyError(R	R;((s/usr/lib64/python2.6/sets.pytdiscard
scCs|iiƒdS(s+Remove and return an arbitrary set element.i(Rtpopitem(R	((s/usr/lib64/python2.6/sets.pytpopscCs
t|ƒS(N(R(R	((s/usr/lib64/python2.6/sets.pyRDscCs
t|ƒS(N(t_TemporarilyImmutableSet(R	((s/usr/lib64/python2.6/sets.pyR8sN(RRLRMRNR:R
RURWRXRYRZR[R]R\R`R_RR^RaRbRdRfRDR8(((s/usr/lib64/python2.6/sets.pyR“s*													
	
	
		RgcBseZd„Zd„ZRS(cCs||_|i|_dS(N(t_setR(R	tset((s/usr/lib64/python2.6/sets.pyR
(s	cCs
|iiƒS(N(RhRC(R	((s/usr/lib64/python2.6/sets.pyRS,s(RRLR
RS(((s/usr/lib64/python2.6/sets.pyRg$s	(
RMt	itertoolsRRt__all__twarningstwarntDeprecationWarningtobjectRRRRg(((s/usr/lib64/python2.6/sets.pyt<module>)sÿ:‘

haha - 2025