Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 lŽŒYÒVã@sñddlZddlmZddlmZmZdddgZdd„Zd d „Zd d „Z d d„Z Gdd„de ƒZ dZ Gdd„deƒZGdd„ddeƒZ Gdd„dee ƒZdd„Zdd„ZdS)éN)Ú OrderedDict)ÚMappingProxyTypeÚDynamicClassAttributeÚEnumÚIntEnumÚuniquecCs+t|dƒp*t|dƒp*t|dƒS)z5Returns True if obj is a descriptor, False otherwise.Ú__get__Ú__set__Ú __delete__)Úhasattr)Úobj©r ú#/opt/python35/lib/python3.5/enum.pyÚ_is_descriptorsrcCsl|dd…|dd…ko+dknok|dd…dkok|dd …dkokt|ƒdkS) z3Returns True if a __dunder__ name, False otherwise.NéÚ__éÚ_ééþÿÿÿéýÿÿÿr)Úlen)Únamer r rÚ _is_dunders0rcCs`|d|dkodkno_|dd…dko_|dd…dko_t|ƒdkS)z1Returns True if a _sunder_ name, False otherwise.rérréÿÿÿÿrr)r)rr r rÚ _is_sunders$rcCs"dd„}||_d|_dS)z"Make the given class un-picklable.cSstd|ƒ‚dS)Nz%r cannot be pickled)Ú TypeError)ÚselfÚprotor r rÚ_break_on_call_reduce"sz6_make_class_unpicklable.._break_on_call_reducez N)Ú __reduce_ex__Ú __module__)Úclsr r r rÚ_make_class_unpicklable s  r$cs:eZdZdZ‡fdd†Z‡fdd†Z‡S)Ú _EnumDictz§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. cstƒjƒg|_dS)N)ÚsuperÚ__init__Ú _member_names)r)Ú __class__r rr'/s z_EnumDict.__init__csŸt|ƒrtdƒ‚nmt|ƒr*n^||jkrLtd|ƒ‚n<t|ƒsˆ||krxtd||ƒ‚|jj|ƒtƒj||ƒdS)zåChanges anything not dundered or not a descriptor. If an enum member name is used twice, an error is raised; duplicate values are not checked for. Single underscore (sunder) names are reserved. z(_names_ are reserved for future Enum usezAttempted to reuse key: %rzKey already defined as: %rN) rÚ ValueErrorrr(rrÚappendr&Ú __setitem__)rÚkeyÚvalue)r)r rr,3s    z_EnumDict.__setitem__)Ú__name__r"Ú __qualname__Ú__doc__r'r,r r )r)rr%(s r%c sNeZdZdZedd„ƒZ‡fdd†Zdd„Zdd dd dd dd d dd„Zdd„Z ‡fdd†Z dd„Z dd„Z dd„Z dd„Zdd„Zedd„ƒZd d!„Zd"d#„Z‡fd$d%†Zdd dd dd dd d d&d'„Zed(d)„ƒZed*d+„ƒZ‡S),ÚEnumMetazMetaclass for EnumcCstƒS)N)r%)Úmetaclsr#Úbasesr r rÚ __prepare__TszEnumMeta.__prepare__c s^|j|ƒ\‰}|jˆˆ|ƒ\}}}‡fdd†ˆjDƒ}xˆjD] } ˆ| =qYWt|ƒdh@} | r¡tdjdj| ƒƒƒ‚dˆkr·dˆdcs z$EnumMeta.__new__..ÚmrozInvalid enum member name: {0}ú,r1zAn enumeration.cSs&h|]}|jD] }|’qqSr )Ú__dict__)r6ÚbÚar r rú ys z#EnumMeta.__new__..r!Ú__getnewargs_ex__Ú__getnewargs__Ú __reduce__c3s|]}|ˆjkVqdS)N)r<)r6Úm)Ú member_typer rú Œsz#EnumMeta.__new__..Ú_value_Ú__repr__Ú__str__Ú __format__)r@rAr!rB)rGrHrIr!) Ú _get_mixins_Ú _find_new_r(Úsetr*ÚformatÚjoinr&Ú__new__Ú_member_names_rÚ _member_map_Ú _member_type_r:Ú_value2member_map_ÚobjectÚanyr$Ú isinstanceÚtupler rFÚ_name_Ú __objclass__r'Úitemsr+ÚsetattrrÚgetattrrÚ__new_member__)r3r#r4r8Ú first_enumrOÚsave_newÚuse_argsÚmembersrÚ invalid_namesÚ enum_classÚbase_attributesÚmethodsÚ member_namer.ÚargsÚ enum_memberÚcanonical_memberÚ class_methodÚ obj_methodÚ enum_method)r))r8rDrrOXs‚                             zEnumMeta.__new__cCsdS)z6 classes/types should always be True. Tr )rr r rÚ__bool__ÑszEnumMeta.__bool__NÚmoduleÚqualnameÚtypeÚstartrc CsD|dkr|j||ƒS|j||d|d|d|d|ƒS)aEither 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: `value` will be the name of the new class. `names` should be either a string of white-space/comma delimited names (values will start at `start`), or an iterator/mapping of name, value pairs. `module` should be set to the module this class is being created in; if it is not set, an attempt to find that module will be made, but if it fails the class will not be picklable. `qualname` should be set to the actual location this class can be found at in its module; by default it is set to the global scope. If this is not correct, unpickling will fail in some circumstances. `type`, if set, will be mixed in as the first base class. Nrnrorprq)rOÚ_create_)r#r.Únamesrnrorprqr r rÚ__call__×s zEnumMeta.__call__cCst||ƒo|j|jkS)N)rVrXrQ)r#Úmemberr r rÚ __contains__õszEnumMeta.__contains__cs6||jkr"td|jƒ‚tƒj|ƒdS)Nz%s: cannot delete Enum member.)rQÚAttributeErrorr/r&Ú __delattr__)r#Úattr)r)r rrxøszEnumMeta.__delattr__cCsddddg|jS)Nr)r1Ú __members__r")rP)rr r rÚ__dir__szEnumMeta.__dir__c CsOt|ƒrt|ƒ‚y|j|SWn!tk rJt|ƒd‚YnXdS)a5Return 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)rrwrQÚKeyError)r#rr r rÚ __getattr__s   zEnumMeta.__getattr__cCs |j|S)N)rQ)r#rr r rÚ __getitem__szEnumMeta.__getitem__cs‡fdd†ˆjDƒS)Nc3s|]}ˆj|VqdS)N)rQ)r6r)r#r rrEsz$EnumMeta.__iter__..)rP)r#r )r#rÚ__iter__szEnumMeta.__iter__cCs t|jƒS)N)rrP)r#r r rÚ__len__szEnumMeta.__len__cCs t|jƒS)z·Returns a mapping of member name->value. This mapping lists all enum members, including aliases. Note that this is a read-only view of the internal mapping. )rrQ)r#r r rrzszEnumMeta.__members__cCs d|jS)Nz )r/)r#r r rrG'szEnumMeta.__repr__cs ‡fdd†tˆjƒDƒS)Nc3s|]}ˆj|VqdS)N)rQ)r6r)r#r rrE+sz(EnumMeta.__reversed__..)ÚreversedrP)r#r )r#rÚ __reversed__*szEnumMeta.__reversed__csD|jjdiƒ}||kr-tdƒ‚tƒj||ƒdS)zù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. rQzCannot reassign members.N)r<Úgetrwr&Ú __setattr__)r#rr.Ú member_map)r)r rr„-s  zEnumMeta.__setattr__cCs˜|j}|dkr|fn ||f}|j||ƒ} t|tƒrc|jddƒjƒ}t|ttfƒr§t|dtƒr§dd„t||ƒDƒ}xG|D]?} t| tƒr×| || } } n | \} } | | | value pairs. Nr;ú rcSs"g|]\}}||f‘qSr r )r6ÚiÚer r rú Ns z%EnumMeta._create_..rr/)r)r5rVÚstrÚreplaceÚsplitrWÚlistÚ enumeraterOÚsysÚ _getframeÚ f_globalsrwr*r$r"r0)r#Ú class_namersrnrorprqr3r4r8ÚitemrfÚ member_valuercÚexcr r rrr:s0 !(        zEnumMeta._create_cCsø|sttfSd}}x>|D]6}|tk r!t|tƒr!|jr!tdƒ‚q!Wt|tƒsvtdƒ‚t|dtƒs |d}|d}nNxK|djD]<}t|tƒrØ|dkrê|}q®|dkr®|}q®W||fS)zžReturns the type for creating enum members, and the first inherited enum class. bases: the tuple of bases that was given to __new__ NzCannot extend enumerationszHnew enumerations must be created as `ClassName([mixin_type,] enum_type)`rrr)rTrÚ issubclassrPrÚ__mro__)r4rDr^Úbaser r rrJis(            zEnumMeta._get_mixins_c CsÍ|jddƒ}|dk }|dkr¢xudD]d}xN||fD]@}t||dƒ}|ddjtjtjhkrD|}PqDW|dk r1Pq1Wtj}|tjkrºd}nd}|||fS)a Returns 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__ rONr]FT)r]rO)rƒr\rOrTr) r8rDr^rOr_ÚmethodÚpossibleÚtargetr`r r rrK–s(       zEnumMeta._find_new_)r/r"r0r1Ú classmethodr5rOrmrtrvrxr{r}r~rr€ÚpropertyrzrGr‚r„rrÚ staticmethodrJrKr r )r)rr2Rs& y '         '/-r2c@s£eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z e dd„ƒZ e dd„ƒZ eddd„ƒZdS)rzRGeneric enumeration. Derive from this class to define new enumerations. c Cs“t|ƒ|kr|Sy||jkr3|j|SWn?tk rux*|jjƒD]}|j|krT|SqTWYnXtd||jfƒ‚dS)Nz%r is not a valid %s)rprSrrQÚvaluesrFr*r/)r#r.rur r rrOËs  z Enum.__new__cCsd|jj|j|jfS)Nz <%s.%s: %r>)r)r/rXrF)rr r rrGÞsz Enum.__repr__cCsd|jj|jfS)Nz%s.%s)r)r/rX)rr r rrHâsz Enum.__str__cs3‡fdd†ˆjjƒDƒ}dddg|S)NcsEg|];}|jD]+}|ddkr|ˆjkr|‘qqS)rr)r<rQ)r6r#rC)rr rr‰çs  z Enum.__dir__..r)r1r")r)r:)rÚadded_behaviorr )rrr{åsz Enum.__dir__cCsF|jtkr$t}t|ƒ}n|j}|j}|j||ƒS)N)rRrTrŠrFrI)rÚ format_specr#Úvalr r rrIîs   zEnum.__format__cCs t|jƒS)N)ÚhashrX)rr r rÚ__hash__ýsz Enum.__hash__cCs|j|jffS)N)r)rF)rrr r rr!szEnum.__reduce_ex__cCs|jS)zThe name of the Enum member.)rX)rr r rr sz Enum.namecCs|jS)zThe value of the Enum member.)rF)rr r rr.sz Enum.valueNcs‰ttj|ƒ}|r(t|ƒ}n|}‡fdd†|jƒDƒ}|||d|ƒ}t|_|j|jƒ|||<|S)z[ Create a new Enum subclass that replaces a collection of global constants cs+i|]!\}}ˆ|ƒr||“qSr r )r6rr.)Úfilterr rr9#s z!Enum._convert..rn)Úvarsr�ÚmodulesrZÚ_reduce_ex_by_namer!Úupdaterz)r#rrnr¥ÚsourceÚmodule_globalsrar )r¥rÚ_converts   z Enum._convert)r/r"r0r1rOrGrHr{rIr¤r!rrr.rœr¬r r r rrÅs       Ú metaclassc@seZdZdZdS)rz.Enum where members are also (and must be) intsN)r/r"r0r1r r r rr,s cCs|jS)N)r)rrr r rr¨0sr¨cCs‡g}xB|jjƒD]1\}}||jkr|j||jfƒqW|rƒdjdd„|Dƒƒ}td||fƒ‚|S)z?Class decorator for enumerations ensuring unique member values.z, cSs&g|]\}}d||f‘qS)z%s -> %sr )r6Úaliasrr r rr‰;s zunique..z duplicate values found in %r: %s)rzrZrr+rNr*)Ú enumerationÚ duplicatesrruÚ alias_detailsr r rr3s)r�Ú collectionsrÚtypesrrÚ__all__rrrr$Údictr%rrpr2Úintrr¨rr r r rÚs     'ÿtg