/usr/lib/python2.6/site-packages/enum
NameSizeModeActions
doc/-0755rm
enum.py292620644editdlrm
enum.pyc232990644editdlrm
LICENSE15080644editdlrm
README1280644editdlrm
test_enum.py622830644editdlrm
test_enum.pyc820060644editdlrm
__init__.py292620644editdlrm
__init__.pyc235270644editdlrm
Edit: /usr/lib/python2.6/site-packages/enum/enum.pyc (23299B)
Ñò ›KVc@sdZddkZdddgZdddfZed eid ƒZyeWne j od „ZnXydd k l Z Wne j o e Z nXyeWne j o eZnXyeWne j o eZnXd efd„ƒYZd„Zd„Zd„Zd„Zdefd„ƒYZe Zdefd„ƒYZhZdedscCs^|d |djo djno8|dd!djo$|dd!djot|ƒdjS(s3Returns True if a __dunder__ name, False otherwise.iiþÿÿÿt__it_iýÿÿÿi(tlen(tname((s-/usr/lib/python2.6/site-packages/enum/enum.pyt _is_dunderFs&cCs^|d|djo djno8|dd!djo$|dd!djot|ƒdjS(s1Returns True if a _sunder_ name, False otherwise.iiÿÿÿÿRiiiþÿÿÿ(R(R((s-/usr/lib/python2.6/site-packages/enum/enum.pyt _is_sunderNs&cCs"dd„}||_d|_dS(s"Make the given class un-picklable.cSstd|ƒ‚dS(Ns%r cannot be pickled(t TypeError(R tprotocol((s-/usr/lib/python2.6/site-packages/enum/enum.pyt_break_on_call_reduceXss N(R t __reduce_ex__R(tclsR#((s-/usr/lib/python2.6/site-packages/enum/enum.pyt_make_class_unpicklableVs  t _EnumDictcBs eZdZd„Zd„ZRS(s§Track 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|ƒiƒg|_dS(N(tsuperR'R t _member_names(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyR escCsÔtdjo|djodSt|ƒotdƒ‚n|t|ƒonk||ijotd|ƒ‚nGt|ƒp9||jotd||ƒ‚n|ii|ƒntt |ƒi ||ƒ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__(R tkeyR((s-/usr/lib/python2.6/site-packages/enum/enum.pyR.is    (RRRR R.(((s-/usr/lib/python2.6/site-packages/enum/enum.pyR'^s tEnumMetacBsñeZdZed„ƒZd„Zdddd„Zd„Zd„Z d„Z e d„ƒZ d„Z d „Zd „Zd „Zd „Zd „Zd„Zdddd„Zed„ƒZedjoed„ƒZned„ƒZRS(sMetaclass for EnumcCstƒS(N(R'(tmetaclsR%tbases((s-/usr/lib/python2.6/site-packages/enum/enum.pyt __prepare__’scs×tˆƒtjo:ˆ}tƒ‰x(|iƒD]\}}|ˆ|¦s R*g@R/cSs|dS(i((titem((s-/usr/lib/python2.6/site-packages/enum/enum.pyt¯st,t tmrosInvalid enum member name(s): %ss, t_value_R$t__getnewargs_ex__t__getnewargs__t __reduce__c3s"x|]}|ˆijVqWdS(N(t__dict__(R4tm(t member_type(s-/usr/lib/python2.6/site-packages/enum/enum.pys s t__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*t_[1]Rt_[2]t_[3]taliasest invalid_namest enum_classt member_nametargst enum_membertcanonical_membert unpicklabletmethodst class_methodt obj_methodt enum_methodtmethod((RBR6s-/usr/lib/python2.6/site-packages/enum/enum.pyRO–sÔ       @6  2!                        ! % cCs:|djo|i||ƒS|i||d|d|ƒS(s¯Either 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%RtnamesRRP((s-/usr/lib/python2.6/site-packages/enum/enum.pyt__call__9s cCs t||ƒo|i|ijS(N(R`RR](R%tmember((s-/usr/lib/python2.6/site-packages/enum/enum.pyt __contains__NscCsA||ijotd|iƒ‚ntt|ƒi|ƒdS(Ns%s: cannot delete Enum member.(R]RRR(R0t __delattr__(R%tattr((s-/usr/lib/python2.6/site-packages/enum/enum.pyR…QscCsddddg|iS(Nt __class__Rt __members__R(R\(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyt__dir__YscCs |iiƒS(s­Returns 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%((s-/usr/lib/python2.6/site-packages/enum/enum.pyRˆ]scCsRt|ƒot|ƒ‚ny|i|SWntj ot|ƒ‚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((s-/usr/lib/python2.6/site-packages/enum/enum.pyt __getattr__gs cCs |i|S(N(R](R%R((s-/usr/lib/python2.6/site-packages/enum/enum.pyt __getitem__wscs‡fd†ˆiDƒS(Nc3s x|]}ˆi|VqWdS(N(R](R4R(R%(s-/usr/lib/python2.6/site-packages/enum/enum.pys {s (R\(R%((R%s-/usr/lib/python2.6/site-packages/enum/enum.pyt__iter__zscs‡fd†tˆiƒDƒS(Nc3s x|]}ˆi|VqWdS(N(R](R4R(R%(s-/usr/lib/python2.6/site-packages/enum/enum.pys ~s (treversedR\(R%((R%s-/usr/lib/python2.6/site-packages/enum/enum.pyt __reversed__}scCs t|iƒS(N(RR\(R%((s-/usr/lib/python2.6/site-packages/enum/enum.pyt__len__€scCs d|iS(Ns (R(R%((s-/usr/lib/python2.6/site-packages/enum/enum.pyRCƒscCsO|iidhƒ}||jotdƒ‚ntt|ƒi||ƒdS(sùBlock 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((s-/usr/lib/python2.6/site-packages/enum/enum.pyR’†s c Cs=tdjoQt|tƒo=y|idƒ}WqZtj otd|ƒ‚qZXq^n|i}|d jo |f}n ||f}|i||ƒ}g}t|t ƒo|i ddƒi ƒ}nt|t t fƒoOt|dt ƒo;g} t|ƒD]\} } | | | dfq ~ }nxV|D]N} t| t ƒo| || } }n | \} }||| <|i| ƒq=Wt| t ƒpdi|ƒ|d value. g@tasciis %r is not representable in ASCIIR9R:iiR*iRN(R+R`tunicodetencodetUnicodeEncodeErrorR!R‡R R3t basestringRXRYRatlistt enumerateR-R[ROt_syst _getframet f_globalsRR,R&R(R%t class_nameRRRPR1R2R6R*RotiteR7Rut member_valueRt((s-/usr/lib/python2.6/site-packages/enum/enum.pyR€“sF     *;      cCs"| p tdjo ttfSd}}xE|D]=}|tj o*t|tƒo|iotdƒ‚q1q1Wt|tƒptdƒ‚nt|dtƒp|d}|d}n[xW|diD]H}t|tƒo|djo |}qqÌ|djo |}qÌqÌW||fS(sžReturns 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)`iiÿÿÿÿN(RR RdRgR\R!t__mro__(R2RBRktbase((s-/usr/lib/python2.6/site-packages/enum/enum.pyRSÏs,       g@c Cs„|iddƒ}|odttfStddƒ}ttdƒ}tdjo |}ntid}xëdD]Ú}x¿||fD]±}y|i|} Wn+ttfj ot||dƒ} nX| d|||gjoS|djo| |d(R‡RRbR<(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyRC†sRCcCsd|ii|ifS(Ns%s.%s(R‡RRb(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyRDŒsRDcCs`g}|iiƒD]2}|iD]"}|ddjo ||q!q!q~}dddg|S(NiRR‡RR(R‡R;R@(R RoR%RAtadded_behavior((s-/usr/lib/python2.6/site-packages/enum/enum.pyR‰‘s  (R‰cCsH|itjot}t|ƒ}n|i}|i}|i||ƒS(N(R^RdtstrRRE(R t format_specR%tval((s-/usr/lib/python2.6/site-packages/enum/enum.pyREœs   REgÍÌÌÌÌÌ@cCsYt|ƒ|ijo||jodSndSntStd|ii|iifƒ‚(Niiÿÿÿÿs unorderable types: %s() and %s()(RPR‡tNotImplementedR!R(R tother((s-/usr/lib/python2.6/site-packages/enum/enum.pyRF³s  RFcCs&td|ii|iifƒ‚dS(Nsunorderable types: %s() <= %s()(R!R‡R(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRG¿sRGcCs&td|ii|iifƒ‚dS(Nsunorderable types: %s() < %s()(R!R‡R(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRHÄsRHcCs&td|ii|iifƒ‚dS(Nsunorderable types: %s() >= %s()(R!R‡R(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRJÉsRJcCs&td|ii|iifƒ‚dS(Nsunorderable types: %s() > %s()(R!R‡R(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRIÎsRIcCs%t|ƒ|ijo ||jStS(N(RPR‡R±(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRKÔs RKcCs%t|ƒ|ijo ||j StS(N(RPR‡R±(R R²((s-/usr/lib/python2.6/site-packages/enum/enum.pyRLÛs RLcCs t|iƒS(N(thashRb(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyRMâsRMcCs|i|iffS(N(R‡R<(R tproto((s-/usr/lib/python2.6/site-packages/enum/enum.pyR$çsR$cCs|iS(N(Rb(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyRósRcCs|iS(N(R<(R ((s-/usr/lib/python2.6/site-packages/enum/enum.pyRùsRcBseZdZRS(s.Enum where members are also (and must be) ints(RRR(((s-/usr/lib/python2.6/site-packages/enum/enum.pyRsc Cs¯g}xG|iiƒD]6\}}||ijo|i||ifƒqqW|oTdig}|D]\}}|d||fqh~ƒ}td||fƒ‚n|S(sIClass decorator that ensures only unique members exist in an enumeration.s, s%s -> %ssduplicate names found in %r: %s(RˆRRRR-R[R,(t enumerationt duplicatesRRƒRotaliastduplicate_names((s-/usr/lib/python2.6/site-packages/enum/enum.pyR s 4(0RtsysR›t__all__tversiontfloatt version_infoR+Rt NameErrort collectionsRt ImportErrorR R˜R®R•RdR RRR R&RQR'RRPR0ttemp_enum_dictRORCRDR‰RERFRGRHRJRIRKRLRMR$RRRhRR(((s-/usr/lib/python2.6/site-packages/enum/enum.pyts¨        /ÿÞ