config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/sets.pyc

³ò
h”Rc@sdZddklZyddklZlZWngej
o[d„Zd„ZyeefWn1e	j
o%ddjddjf\ZZnXnXddd	gZ
defd
„ƒYZd	efd„ƒYZ
defd„ƒYZd
efd„ƒYZdS(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ÿÿÿÿ(t
generators(tifiltertifilterfalseccsE|djo
d„}nx$|D]}||ƒo	|Vq!q!WdS(NcSs|S(N((tx((s /usr/local/lib/python2.5/sets.pyt	predicate@s(tNone(RtiterableR((s /usr/local/lib/python2.5/sets.pyR>s


ccsE|djo
d„}nx$|D]}||ƒp	|Vq!q!WdS(NcSs|S(N((R((s /usr/local/lib/python2.5/sets.pyRGs(R(RRR((s /usr/local/lib/python2.5/sets.pyREs


itBaseSettSettImmutableSetcBseZdZdgZd„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„Zd„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/local/lib/python2.5/sets.pyt__init__ZscCs
t|iƒS(s'Return the number of elements of a set.(tlenR
(R
((s /usr/local/lib/python2.5/sets.pyt__len__cscCs
|iƒS(seReturn string representation of a set.

        This looks like 'Set([<list of elements>])'.
        (t_repr(R
((s /usr/local/lib/python2.5/sets.pyt__repr__gscCs8|iiƒ}|o|iƒnd|ii|fS(Ns%s(%r)(R
tkeystsortRt__name__(R
tsortedtelements((s /usr/local/lib/python2.5/sets.pyRqscCs
|iiƒS(ssReturn an iterator over the elements or a set.

        This is the keys iterator for the underlying dict.
        (R
titerkeys(R
((s /usr/local/lib/python2.5/sets.pyt__iter__wscCs
td‚dS(Nscan't compare sets using cmp()(R(R
tother((s /usr/local/lib/python2.5/sets.pyt__cmp__ƒscCs,t|tƒo|i|ijSntSdS(N(t
isinstanceRR
tFalse(R
R((s /usr/local/lib/python2.5/sets.pyt__eq__•scCs,t|tƒo|i|ijSntSdS(N(RRR
tTrue(R
R((s /usr/local/lib/python2.5/sets.pyt__ne__›scCs#|iƒ}|ii|iƒ|S(sReturn a shallow copy of a set.(RR
tupdate(R
tresult((s /usr/local/lib/python2.5/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(R#R$RtidR
R(R
tmemoR$R"tdatatvaluetelt((s /usr/local/lib/python2.5/sets.pyt__deepcopy__«s	cCs%t|tƒptSn|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/local/lib/python2.5/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/local/lib/python2.5/sets.pyR,Ís
cCs%t|tƒptSn|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/local/lib/python2.5/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.)
        (RRRRRR
thas_keyR(R
Rtlittletbigtcommon((s /usr/local/lib/python2.5/sets.pyR/ßs
cCs%t|tƒptSn|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/local/lib/python2.5/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.)
        (RR
RtAttributeErrorRRR1(R
RR"R'R(tselfdatat	otherdataR)((s /usr/local/lib/python2.5/sets.pyR5ös		
cCs%t|tƒptSn|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/local/lib/python2.5/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.)
        (RR
R7RRRR1(R
RR"R'R9R(R)((s /usr/local/lib/python2.5/sets.pyR:s	
cCsay||ijSWnItj
o=t|ddƒ}|djo‚n|ƒ|ijSnXdS(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(R
RtgetattrR(R
telementt	transform((s /usr/local/lib/python2.5/sets.pyt__contains__$s
cCsV|i|ƒt|ƒt|ƒjotSnx!t|ii|ƒD]
}tSqDWtS(s-Report whether another set contains this set.(t_binary_sanity_checkRRRR
R1R(R
RR)((s /usr/local/lib/python2.5/sets.pytissubset3s
cCsV|i|ƒt|ƒt|ƒjotSnx!t|ii|ƒD]
}tSqDWtS(s-Report whether this set contains another set.(RARRRR
R1R(R
RR)((s /usr/local/lib/python2.5/sets.pyt
issuperset<s
cCs3|i|ƒt|ƒt|ƒjo
|i|ƒS(N(RARRB(R
R((s /usr/local/lib/python2.5/sets.pyt__lt__Is
cCs3|i|ƒt|ƒt|ƒjo
|i|ƒS(N(RARRC(R
R((s /usr/local/lib/python2.5/sets.pyt__gt__Ms
cCs!t|tƒp
td‚ndS(Ns,Binary operation only permitted between sets(RRR(R
R((s /usr/local/lib/python2.5/sets.pyRASscCs+d}x|D]}|t|ƒN}q
W|S(Ni(thash(R
R"R)((s /usr/local/lib/python2.5/sets.pyt
_compute_hashYs
cCsJ|i}t|tƒo|i|iƒdSnt}t|ƒtttfjo‹t	|ƒ}xätopy#x|D]}|||<qsWdSWqbt
j
o:t|ddƒ}|djo‚n|||ƒ<qbXqbWnixe|D]]}y|||<Wqåt
j
o:t|ddƒ}|djo‚n|||ƒ<qåXqåWdS(Nt__as_immutable__(
R
RRR!RttypetlistttupletxrangetiterRR=R(R
RR'R(titR>R?((s /usr/local/lib/python2.5/sets.pyR.ds8	

(#Rt
__module__t__doc__t	__slots__RRRt__str__RRRRRR R#t__copy__R*R-R,R0R/R6R5R;R:R@RBRCt__le__t__ge__RDRERARGR.(((s /usr/local/lib/python2.5/sets.pyRSs@																												
				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(RRVR
R.(R
R((s /usr/local/lib/python2.5/sets.pyRs		
cCs*|idjo|iƒ|_n|iS(N(RVRRG(R
((s /usr/local/lib/python2.5/sets.pyt__hash__—scCs|i|ifS(N(R
RV(R
((s /usr/local/lib/python2.5/sets.pyt__getstate__œscCs|\|_|_dS(N(R
RV(R
tstate((s /usr/local/lib/python2.5/sets.pyt__setstate__ŸsN(	RRORPRQRRRWRXRZ(((s /usr/local/lib/python2.5/sets.pyR	‰s			cBsËeZdZgZdd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„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(R
RR.(R
R((s /usr/local/lib/python2.5/sets.pyR©s	
cCs
|ifS(N(R
(R
((s /usr/local/lib/python2.5/sets.pyRX¯scCs|\|_dS(N(R
(R
R'((s /usr/local/lib/python2.5/sets.pyRZ³scCs
td‚dS(sA Set cannot be hashed.s'Can't hash a Set, only an ImmutableSet.N(R(R
((s /usr/local/lib/python2.5/sets.pyRW¶scCs$|i|ƒ|ii|iƒ|S(s2Update a set with the union of itself and another.(RAR
R!(R
R((s /usr/local/lib/python2.5/sets.pyt__ior__Às
cCs|i|ƒdS(s2Update a set with the union of itself and another.N(R.(R
R((s /usr/local/lib/python2.5/sets.pytunion_updateÆscCs!|i|ƒ||@i|_|S(s9Update a set with the intersection of itself and another.(RAR
(R
R((s /usr/local/lib/python2.5/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/local/lib/python2.5/sets.pytintersection_updateÐscCs|i|ƒ|i|ƒ|S(sAUpdate a set with the symmetric difference of itself and another.(RAtsymmetric_difference_update(R
R((s /usr/local/lib/python2.5/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(R
RRRRtclear(R
RR'R(R)((s /usr/local/lib/python2.5/sets.pyR_Ýs	

cCs|i|ƒ|i|ƒ|S(s1Remove all elements of another set from this set.(RAtdifference_update(R
R((s /usr/local/lib/python2.5/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(R
RRRRaRR1(R
RR'R)((s /usr/local/lib/python2.5/sets.pyRbñs	
cCs|i|ƒdS(s9Add all values from an iterable (such as a list or file).N(R.(R
R((s /usr/local/lib/python2.5/sets.pyR!ýscCs|iiƒdS(s"Remove all elements from this set.N(R
Ra(R
((s /usr/local/lib/python2.5/sets.pyRascCsayt|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.
        RHN(RR
RR=R(R
R>R?((s /usr/local/lib/python2.5/sets.pytadds
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.
        R<N(R
RR=R(R
R>R?((s /usr/local/lib/python2.5/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(RetKeyError(R
R>((s /usr/local/lib/python2.5/sets.pytdiscard!scCs|iiƒdS(s+Remove and return an arbitrary set element.i(R
tpopitem(R
((s /usr/local/lib/python2.5/sets.pytpop+scCs
t|ƒS(N(R	(R
((s /usr/local/lib/python2.5/sets.pyRH/scCs
t|ƒS(N(t_TemporarilyImmutableSet(R
((s /usr/local/lib/python2.5/sets.pyR<3sN(RRORPRQRRRXRZRWR[R\R]R^R`R_RcRbR!RaRdReRgRiRHR<(((s /usr/local/lib/python2.5/sets.pyR¢s,			
											
	
	
		RjcBseZd„Zd„ZRS(cCs||_|i|_dS(N(t_setR
(R
tset((s /usr/local/lib/python2.5/sets.pyR<s	cCs
|iiƒS(N(RkRG(R
((s /usr/local/lib/python2.5/sets.pyRW@s(RRORRW(((s /usr/local/lib/python2.5/sets.pyRj8s	N(RPt
__future__Rt	itertoolsRRtImportErrorRRt	NameErrort__all__tobjectRR	RRj(((s /usr/local/lib/python2.5/sets.pys<module>)s 		(ÿ7–

Man Man