• File: __init__.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/enum/__init__.pyc
  • Date Modified: 11/24/2015 3:30 AM
  • File size: 22.65 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

pvTc@sdZddlZdddgZdddfZed	ejd
 ZyeWne	k
rkdZnXyddl
mZWnek
re
ZnXyeWne	k
reZnXyeWne	k
reZnXd
efdYZdZdZdZdZdefdYZe
ZdefdYZiZded<dZeed<[dZeed<[dZeed<[dZ e ed <[ d!Z!e!ed"<[!ed#krd$Z"e"ed%<["nXd&Z#e#ed'<[#d(Z$e$ed)<[$d*Z%e%ed+<[%d,Z&e&ed-<[&d.Z'e'ed/<['d0Z(e(ed1<[(d2Z)e)ed3<[)d4Z*e*ed5<[*ed6Z+e+ed7<[+ed8Z,e,ed9<[,edefeZ[de-efd:YZ.d;Z/dS(<sPython EnumerationsiNtEnumtIntEnumtuniqueiiis%s.%sicCsx|D]}|rtSqWtS(N(tTruetFalse(titerabletelement((s1/usr/lib/python2.7/site-packages/enum/__init__.pytanys
(tOrderedDictt_RouteClassAttributeToGetattrcBs8eZdZddZddZdZdZRS(sjRoute attribute access on a class to __getattr__.

    This is a descriptor, used to define attributes that act differently when
    accessed through an instance and through a class.  Instance access remains
    normal, but access to an attribute through a class will be routed to the
    class's __getattr__ method; this is done by raising AttributeError.

    cCs
||_dS(N(tfget(tselfR
((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__init__/scCs%|dkrtn|j|S(N(tNonetAttributeErrorR
(Rtinstancet
ownerclass((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__get__2scCstddS(Nscan't set attribute(R(RRtvalue((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__set__7scCstddS(Nscan't delete attribute(R(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt
__delete__:sN(t__name__t
__module__t__doc__R
RRRR(((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR	&s
	cCs+t|dp*t|dp*t|dS(s5Returns True if obj is a descriptor, False otherwise.RRR(thasattr(tobj((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt_is_descriptor>scCsZ|d |dkodknoY|dd!dkoY|dd!dkoYt|dkS(s3Returns True if a __dunder__ name, False otherwise.iit__it_ii(tlen(tname((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt
_is_dunderFs$cCsZ|d|dkodknoY|dd!dkoY|dd!dkoYt|dkS(s1Returns True if a _sunder_ name, False otherwise.iiRiii(R(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt
_is_sunderNs$cCs"dd}||_d|_dS(s"Make the given class un-picklable.cSstd|dS(Ns%r cannot be pickled(t	TypeError(Rtprotocol((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt_break_on_call_reduceXss	<unknown>N(R
t
__reduce_ex__R(tclsR#((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt_make_class_unpicklableVs	t	_EnumDictcBs eZdZdZdZRS(sTrack enum member order and ensure member names are not reused.

    EnumMeta will use the names found in self._member_names as the
    enumeration member names.

    cCs tt|jg|_dS(N(tsuperR'Rt
_member_names(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRescCstdkr|dkrdSt|r7tdnst|rFnd||jkrhtd|nBt|s||krtd||n|jj|ntt	|j
||dS(sChanges anything not dundered or not a descriptor.

        If a descriptor is added with the same name as an enum member, the name
        is removed from _member_names (this may leave a hole in the numerical
        sequence of values).

        If an enum member name is used twice, an error is raised; duplicate
        values are not checked for.

        Single underscore (sunder) names are reserved.

        Note:   in 3.x __order__ is simply discarded as a not necessary piece
                leftover from 2.x

        g@t	__order__Ns(_names_ are reserved for future Enum usesAttempted to reuse key: %rsKey already defined as: %r(tpyverR t
ValueErrorRR)R!RtappendR(R't__setitem__(RtkeyR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR.is(RRRRR.(((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR'^s	tEnumMetacBseZdZedZdZddddZdZdZ	dZ
edZdZ
d	Zd
ZdZdZd
ZdZddddZedZedkredZnedZRS(sMetaclass for EnumcCstS(N(R'(tmetaclsR%tbases((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__prepare__scsttkrK}tx'|jD]\}}||<q.Wn|j|\}|j|\}}	}
tfdjD}xjD]
}|=qWjd}
|
dkr_t	dkrSy8gt
|jddD]\}}|^q}
Wq\tk
rOgt
|jD]}|^q:}
q\Xqj}
n]d=t	dkr|
j
ddj}
g|D]}||
kr|^q}|
|7}
nt|tdg@}|rtd	d
j|fntt|j|||}g|_tdk	r?t|_n	i|_|_i|_|dkrr|j}nx_|
D]W}||}t|ts|f}n|}tkr|f}n|
s|r||}t|ds*||_q*n0|||}t|ds*||_n|j}||_||_|j |xI|jjD](\}}|j!|jkrb|}PqbqbW|jj"|||j|<y||j|<Wqytk
rqyXqyWt#}dkr-t$k	r-d}t%fd|Ds*t&|t'}q*q-nxd D]|}t(||}t(|d}t(||d}|kr4||k	r4|dkr|rq4nt)|||q4q4Wt	dkrt*|t+r9t)|dt(t+dq9nKt	dkr9t*|t+r9x*d!D]}t)||t(t+|qWq9nt,dk	r|	ret)|d|j-dnt)|dt,j-dn|S("Nc3s|]}||fVqdS(N((t.0tk(t	classdict(s1/usr/lib/python2.7/site-packages/enum/__init__.pys	<genexpr>sR*g@R/cSs|dS(Ni((titem((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt<lambda>st,t tmrosInvalid enum member name(s): %ss, t_value_R$t__getnewargs_ex__t__getnewargs__t
__reduce__c3s|]}|jkVqdS(N(t__dict__(R4tm(tmember_type(s1/usr/lib/python2.7/site-packages/enum/__init__.pys	<genexpr>	st__repr__t__str__t
__format__g@t__cmp__t__le__t__lt__t__gt__t__ge__t__eq__t__ne__t__hash__t__member_new__t__new__(R=s__getnewargs__s
__reduce_ex__s
__reduce__(s__repr__s__str__s
__format__s
__reduce_ex__(s__le__s__lt__s__gt__s__ge__s__eq__s__ne__s__hash__(.ttypetdictR'titemst_get_mixins_t
_find_new_R)tgetR
R+tsortedR!tkeystreplacetsplittsetR,tjoinR(R0ROt_member_names_Rt_member_map_t
_member_type_t_value2member_map_t
isinstancettupleRR<t_name_t__objclass__RRR-RtobjectRR&Rtgetattrtsetattrt
issubclasstintRR@(R1R%R2R6t
original_dictR5tvt
first_enumROtsave_newtuse_argstmembersRR*Rtaliasest
invalid_namest
enum_classtmember_nametargstenum_membertcanonical_membertunpicklabletmethodstclass_methodt
obj_methodtenum_methodtmethod((R6RBs1/usr/lib/python2.7/site-packages/enum/__init__.pyROs	8
,%
!				

			






#cCs8|dkr|j||S|j||d|d|S(sEither returns an existing member, or creates a new enum class.

        This method is used both when an enum class is given a value to match
        to an enumeration member (i.e. Color(3)) and for the functional API
        (i.e. Color = Enum('Color', names='red green blue')).

        When used for the functional API: `module`, if set, will be stored in
        the new class' __module__ attribute; `type`, if set, will be mixed in
        as the first base class.

        Note: if `module` is not set this routine will attempt to discover the
        calling module by walking the frame stack; if this is unsuccessful
        the resulting class will not be pickleable.

        tmoduleRPN(R
ROt_create_(R%RtnamesR|RP((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__call__9scCst||o|j|jkS(N(R`RR](R%tmember((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__contains__NscCs?||jkr%td|jntt|j|dS(Ns%s: cannot delete Enum member.(R]RRR(R0t__delattr__(R%tattr((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRQscCsddddg|jS(Nt	__class__Rt__members__R(R\(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__dir__YscCs
|jjS(sReturns a mapping of member name->value.

        This mapping lists all enum members, including aliases. Note that this
        is a copy of the internal mapping.

        (R]tcopy(R%((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR]scCsNt|rt|ny|j|SWntk
rIt|nXdS(s5Return the enum member matching `name`

        We use __getattr__ instead of descriptors or inserting into the enum
        class' __dict__ in order to support `name` and `value` being both
        properties for enum members (which live in the class' __dict__) and
        enum members themselves.

        N(RRR]tKeyError(R%R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__getattr__gs	
cCs|j|S(N(R](R%R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__getitem__wscsfdjDS(Nc3s|]}j|VqdS(N(R](R4R(R%(s1/usr/lib/python2.7/site-packages/enum/__init__.pys	<genexpr>{s(R\(R%((R%s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__iter__zscsfdtjDS(Nc3s|]}j|VqdS(N(R](R4R(R%(s1/usr/lib/python2.7/site-packages/enum/__init__.pys	<genexpr>~s(treversedR\(R%((R%s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__reversed__}scCs
t|jS(N(RR\(R%((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt__len__scCsd|jS(Ns	<enum %r>(R(R%((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRCscCsM|jjdi}||kr0tdntt|j||dS(sBlock attempts to reassign Enum members.

        A simple assignment to the class namespace only changes one of the
        several possible ways to get an Enum member from the Enum class,
        resulting in an inconsistent Enumeration.

        R]sCannot reassign members.N(R@RURR(R0t__setattr__(R%RRt
member_map((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRscCstdkrXt|trXy|jd}WqUtk
rQtd|qUXqXn|j}|dkry|f}n||f}|j||}g}t|t	r|j
ddj}nt|tt
fr!t|dt	r!gt|D]\}	}
|
|	df^q}nxT|D]L}t|t	rQ|||}}
n|\}}
|
||<|j|q(Wt|t	sdj||d<n|j||||}|dkrytjd	jd
}Wqttfk
rqXn|dkrt|n	||_|S(s}Convenience method to create a new Enum class.

        `names` can be:

        * A string containing member names, separated either with spaces or
          commas.  Values are auto-numbered from 1.
        * An iterable of member names.  Values are auto-numbered from 1.
        * An iterable of (member name, value) pairs.
        * A mapping of member name -> value.

        g@tasciis %r is not representable in ASCIIR9R:iiR*iRN(R+R`tunicodetencodetUnicodeEncodeErrorR!RR
R3t
basestringRXRYRatlistt	enumerateR-R[ROt_syst	_getframet	f_globalsRR,R&R(R%t
class_nameR~R|RPR1R2R6R*titeR7Rrtmember_valueRq((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR}sD
	(2


	cCs|stdkrttfSd}}xA|D]9}|tk	r.t|tr.|jr.tdq.q.Wt|tstdnt|dts|d}|d}nTxQ|djD]B}t|tr|dkr|}qq|dkr|}qqW||fS(sReturns the type for creating enum members, and the first inherited
        enum class.

        bases: the tuple of bases that was given to __new__

        sCannot extend enumerationssHnew enumerations must be created as `ClassName([mixin_type,] enum_type)`iiN(RR
RdRgR\R!t__mro__(R2RBRktbase((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRSs(


	


g@cCst|jdd}|r%dttfStdd}ttd}tdkrX|}n
tjd}xdD]}x||fD]}y|j|}	Wn)ttfk
rt||d}	nX|	d|||gkr|dkr|	|d<dt	tfSt
|	tr|	j|}	n|	}PqqW|dk	rlPqlqlWtj
}|tj
krat	}
nt}
|t	|
fS(sReturns the __new__ to be used for creating the enum members.

            classdict: the class dictionary given to __new__
            member_type: the data type whose __new__ will be used by default
            first_enum: enumeration to check for an overriding __new__

            RORNN(s__member_new__s__new__(RUR
RReRdRR@RRRR`tstaticmethodRRO(R6RBRkROtN__new__tO__new__tE__new__R{tpossiblettargetRm((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRTsB
	



		c	Cs|jdd}|dk	}|dkrx~dD]j}xQ||fD]C}t||d}|ddjtjtjfkrD|}PqDqDW|dk	r1Pq1q1Wtj}n|tjkrt}nt}|||fS(sReturns the __new__ to be used for creating the enum members.

            classdict: the class dictionary given to __new__
            member_type: the data type whose __new__ will be used by default
            first_enum: enumeration to check for an overriding __new__

            RORNN(s__member_new__s__new__(RUR
ReRORdRRR(	R6RBRkRORlR{RRRm((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRT8s(
	N(RRRtclassmethodR3ROR
RRRRtpropertyRRRRRRRCRR}RRSR+RT(((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR0s(				
							
<.:sNGeneric enumeration.

    Derive from this class to define new enumerations.

RcCst||kr|j}ny||jkr;|j|SWn>tk
r|x.|jjD]}|j|kr\|Sq\WnXtd||jfdS(Ns%s is not a valid %s(RPRR_R!R]tvaluesR,R(R%RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyROps
ROcCsd|jj|j|jfS(Ns<%s.%s: %r>(RRRbR<(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRCsRCcCsd|jj|jfS(Ns%s.%s(RRRb(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRDsRDcCsSg|jjD],}|jD]}|ddkr|^qq}dddg|S(NiRRRR(RR;R@(RR%RAtadded_behavior((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRs

RcCsF|jtkr$t}t|}n|j}|j}|j||S(N(R^RdtstrRRE(Rtformat_specR%tval((s1/usr/lib/python2.7/site-packages/enum/__init__.pyREs		REg@cCsUt||jkr/||kr(dSndSntStd|jj|jjf(Niis unorderable types: %s() and %s()(RPRtNotImplementedR!R(Rtother((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRFsRFcCs&td|jj|jjfdS(Nsunorderable types: %s() <= %s()(R!RR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRGsRGcCs&td|jj|jjfdS(Nsunorderable types: %s() < %s()(R!RR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRHsRHcCs&td|jj|jjfdS(Nsunorderable types: %s() >= %s()(R!RR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRJsRJcCs&td|jj|jjfdS(Nsunorderable types: %s() > %s()(R!RR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRIsRIcCs#t||jkr||kStS(N(RPRR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRKs
RKcCs#t||jkr||k	StS(N(RPRR(RR((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRLs
RLcCs
t|jS(N(thashRb(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRMsRMcCs|j|jffS(N(RR<(Rtproto((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR$sR$cCs|jS(N(Rb(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRsRcCs|jS(N(R<(R((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRsRcBseZdZRS(s.Enum where members are also (and must be) ints(RRR(((s1/usr/lib/python2.7/site-packages/enum/__init__.pyRscCsg}xE|jjD]4\}}||jkr|j||jfqqW|rdjg|D]\}}d||f^qa}td||fn|S(sIClass decorator that ensures only unique members exist in an enumeration.s, s%s -> %ssduplicate names found in %r: %s(RRRRR-R[R,(tenumerationt
duplicatesRRtaliastduplicate_names((s1/usr/lib/python2.7/site-packages/enum/__init__.pyR	s,(0RtsysRt__all__tversiontfloattversion_infoR+Rt	NameErrortcollectionsRtImportErrorR
RRRRdR	RRR R&RQR'RRPR0ttemp_enum_dictRORCRDRRERFRGRHRJRIRKRLRMR$RRRhRR(((s1/usr/lib/python2.7/site-packages/enum/__init__.pyt<module>s







				/