Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!א  *__pycache__/__init__.cpython-311.opt-2.pycnu[ !A?h2 gdZddlZddlZddlmZddlmZddlm Z ddl m Z ddlmZddlmZdd lmZdd lmZ dd lmZejen #e$rYnwxYw dd lmZn #e$rYnwxYwGd dejZ Gddej!Z"Gddej#Z$Gdde%Z&Gdde'Z( ddlm(Z(n #e$rYnwxYw ddlm)Z)n#e$rdZ)YnwxYwdddddZ*dZ+ ddlm+Z+n #e$rYnwxYwGdd e'Z,Gd!d"ej-Z.Gd#d$ej-Z/Gd%d&ejZ0Gd'd(ej1Z2dS))) ChainMapCounter OrderedDictUserDictUserList UserString defaultdictdeque namedtupleN)chain)repeat)starmap) iskeyword)eq) itemgetter)recursive_repr)proxy)r )rceZdZdZdS)_OrderedDictKeysViewc#>Kt|jEd{VdSNreversed_mappingselfs A/opt/alt/python-internal/lib64/python3.11/collections/__init__.py __reversed__z!_OrderedDictKeysView.__reversed__<s.DM***********N__name__ __module__ __qualname__rrrrr:s#+++++rrceZdZdZdS)_OrderedDictItemsViewc#ZKt|jD]}||j|fVdSrrrkeys rrz"_OrderedDictItemsView.__reversed__AsDDM** , ,C c*+ + + + + , ,rNr r$rrr&r&?s#,,,,,rr&ceZdZdZdS)_OrderedDictValuesViewc#VKt|jD]}|j|VdSrrr(s rrz#_OrderedDictValuesView.__reversed__Gs?DM** % %C-$ $ $ $ $ % %rNr r$rrr+r+Es#%%%%%rr+ceZdZdZdS)_Link)prevnextr) __weakref__N)r!r"r# __slots__r$rrr.r.Ks4IIIrr.c@eZdZ dZddZejeefdZej fdZ dZ dZ dZ dd Z dd Zd ZejjxZZd ZdZdZejjZeZefdZddZedZdZdZe ddZ!dZ"dZ#dZ$dZ%dS)rc t|}t|_t |jx|_}|x|_|_i|_|Sr) dict__new__r._OrderedDict__hardroot_proxy_OrderedDict__rootr/r0_OrderedDict__map)clsargskwdsrroots rr6zOrderedDict.__new__]sQN||C  ''#DO444 d $$ DI  rr$c $ |j|fi|dSr)_OrderedDict__update)rotherr=s r__init__zOrderedDict.__init__fs)   e$$t$$$$$rc ||vrO|x|j|<}|j}|j}|||c|_|_|_||_|||_||||dSr)r:r9r/r0r)) rr)value dict_setitemrLinklinkr>lasts r __setitem__zOrderedDict.__setitem__lsz+ d??%)TVV +DJsOd;D9D-14 *DIty$(DId DI T3&&&&&rc ||||j|}|j}|j}||_||_d|_d|_dSr)r:popr/r0)rr) dict_delitemrG link_prev link_nexts r __delitem__zOrderedDict.__delitem__zsZ*  T3z~~c""I I " "   rc#\K |j}|j}||ur|jV|j}||udSdSr)r9r0r)rr>currs r__iter__zOrderedDict.__iter__sM%{y$(NNN9D$rc#\K |j}|j}||ur|jV|j}||udSdSr)r9r/r)rQs rrzOrderedDict.__reversed__sM-{y$(NNN9D$rc |j}|x|_|_|jt |dSr)r9r/r0r:clearr5)rr>s rrVzOrderedDict.clearsF8{ $$ DI  4rTc |std|j}|r|j}|j}||_||_n|j}|j}||_||_|j}|j|=t ||}||fS)Nzdictionary is empty)KeyErrorr9r/r0r)r:r5rK)rrHr>rGrMrNr)rDs rpopitemzOrderedDict.popitems  2011 1{  "9D I!IN!DII9D I!DI!INh JsOs##Ezrc  |j|}|j}|j}|j}||_||_|j}|r%|j}||_||_||_||_dS|j}||_||_||_||_dSr)r:r/r0r9) rr)rHrGrMrN soft_linkr>firsts r move_to_endzOrderedDict.move_to_ends z#I I N " " {  9DDIDI!DIDIIIIEDIDI"EJDIIIrctj}t|dz}||j}|||jdzz }|||j|zz }|||j|zz }|S)N)_sys getsizeoflen__dict__r:r7r9)rsizeofnsizes r __sizeof__zOrderedDict.__sizeof__s IIMvdm$$ tz""Q&& t''!++ t{##a'' rc" t|Sr)rrs rkeyszOrderedDict.keyssD#D)))rc" t|Sr)r&rs ritemszOrderedDict.itemssF$T***rc" t|Sr)r+rs rvalueszOrderedDict.valuess@%d+++rc |j}t|||}||urF|j|}|j}|j}||_||_d|_d|_|S||urt ||Sr)_OrderedDict__markerr5rKr:r/r0rX)rr)defaultmarkerresultrGrMrNs rrKzOrderedDict.pops $V,,   :>>#&&D I I&IN&INDIDIM f  3-- rNc* ||vr||S|||<|Srr$rr)rqs r setdefaultzOrderedDict.setdefaults*  $;;9 S rc |s|jjdS|jjdt|dSNz()()) __class__r!listrlrs r__repr__zOrderedDict.__repr__ sM% 7!^4446 6>222D4F4F4F4FGGrc |}|rt|tr|\}}ni}|}|}t t D].}||d||d/|r||f}n|pd}|jd|dt| fS)Nr$) __getstate__ isinstancetuplecopyvarsrrKr{iterrl)rstateslotsks r __reduce__zOrderedDict.__reduce__s/!!##  &%'' $ uuJJLLEJJLLE+--(( # # !T""" !T"""" &u  ~r5$TZZ\\0B0BBBrc. ||Srr{rs rrzOrderedDict.copy%s+~~d###rc0 |}|D]}|||<|Srr$)r;iterablerDrr)s rfromkeyszOrderedDict.fromkeys)s1 suu  CDII rc t|tr>t||o"t t t ||St||Sr)rrr5__eq__allmap_eqrrAs rrzOrderedDict.__eq__2s]  e[ ) ) K;;tU++JCT54I4I0J0J J{{4'''rc0|||Sr)updaters r__ior__zOrderedDict.__ior__;s E rct|tstS||}|||Srrr5NotImplementedr{rrrAnews r__or__zOrderedDict.__or__?sB%&& "! !nnT"" 5 rct|tstS||}|||Srrrs r__ror__zOrderedDict.__ror__FsB%&& "! !nnU## 4 r)r$)Tr)&r!r"r#r6rBr5rIr8r.rOrSrrVrYr]rh_collections_abcMutableMappingrr@rjrlrn__ne__objectrprKrv_recursive_reprr}rr classmethodrrrrrr$rrrrNs/%%%%"&!1e ' ' ' '-1,<    .2)7>>FX***+++,,, , 3FvxxH',_HHH CCC&$$$[(((rr)r) _tuplegetterc>tt||S)N)doc)property _itemgetter)indexrs rr\sh{5/A/As&K&K&KrF)renamedefaultsmodulec   ttr(ddt t tt jt|}|r|t}tD]^\}}| r(t|s| ds||vrd||<| |_|gzD]n}t|turtd| st!d|t|rt!d|ot}D]V}| dr|st!d|||vrt!d|| |Wi}|t#|}t%|t%krtd t't)t t+t)t)|}t#t t jt%d } d kr| dz } d d d Dzdzt"jt&t"t$t t*f\id|d} d| d| d} t1| | } d| _d|d | d| _||| _t8fd} d|d| j_fd}d|d|_fd}fd}fd}| | j||||fD]}|d|j|_|d | dd || | ||||d! }tD]/\}}t jd"|}t?||||<0t|t"f|}|F t j d j!"d#d$}n#tFt f$rYnwxYw|||_$|S)%N, _z*Type names and field names must be stringsz6Type names and field names must be valid identifiers: z0Type names and field names cannot be a keyword: z-Field names cannot start with an underscore: z"Encountered duplicate field name: z(Got more default values than field names, r_ryc3 K|] }|dV dS)z=%rNr$).0names r znamedtuple..s(DD$|||DDDDDDrrz namedtuple_) _tuple_new __builtins__r!z lambda _cls, z: _tuple_new(_cls, (z))r6zCreate new instance of c||}|kr"tddt||S)Nz Expected z arguments, got ) TypeErrorrc)r;rrs_len num_fields tuple_news r_makeznamedtuple.._makesQ3)) 4<<: % %Q QQCKKQQRR R rz Make a new z# object from a sequence or iterablec||j|}|rtdt||S)NzGot unexpected field names: )rrK ValueErrorr|)rr=rs_map field_namess r_replaceznamedtuple.._replacesODD;==>>  LJDJJJJKK K rz Return a new z2 object replacing specified fields with new valuesc* |jj|zzSr)r{r!)rrepr_fmts rr}znamedtuple..__repr__s9~&D88rc: |j|Sr)_fields)r_dict_zips r_asdictznamedtuple.._asdicts$CuTT$,--...rc |Srr$)r_tuples r__getnewargs__z"namedtuple..__getnewargs__sAvd||r.r$) __doc__r2r_field_defaultsr6rrr}rr__match_args__zAlias for field number r!__main__)%rstrreplacesplitr|rrainternset enumerate isidentifier _iskeyword startswithaddtyperrrrcr5rzipjoinr6evalr!r __defaults__r__func__r#r _getframe f_globalsgetAttributeErrorr")typenamerrrrseenrrfield_defaultsarg_list namespacecoder6rrr}rrmethodclass_namespacerrsrrrrrrrrs ` @@@@@@@@rr r ^s2+s##<!))#s3399;; s3 ,,--K{3x==))H uu$[11  KE4%%'' 1d## 1??3'' 14<<%0[[ E" HHTNNNN [(33 ::S HII I  "" 76-16677 7 d   32)-2233 3 3 55D ??3   * *) $))** * 4<<J$JJKK K N?? x==3{++ + +FGG GhtC0E0E080B0B-D-D(E(EFFGGDK5566K[!!Jyy%%HQCTYYDD DDDDDDsJH I&*E3S&@#E64t  ,(,,I F8 E E E E ED4##G GFFF8FFFGO'[ ,H,,,EN 1111H99999//////   >>"*==FO== ,,,,,)(%  O!--99 tk;E;;<< ,UC 8 8 (UHo 6 6F~ ^A&&044ZLLFF +    D  " Ms8-Q&&Q:9Q:cD |j}|D]}||ddz||<dSNr r_)r)mappingr mapping_getelems r_count_elementsr sA'+K11# D!,,q0 11r)rceZdZ dfd ZdZdZddZdZeddZ dfd Z dd Z d Z d Z fd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ xZ!S) rNc f t|j|fi|dSr)superrBr)rrr=r{s rrBzCounter.__init__Ks@   H%%%%%%%rc dSNr r$r(s r __missing__zCounter.__missing__Ys ;qrcF t|Sr)sumrnrs rtotalz Counter.total^s4;;==!!!rc |1t|tddSddl}|||tdS)Nr_T)r)reverser )r))sortedrlrheapqnlargest)rrfrs r most_commonzCounter.most_commonbsb  9$**,,KNNDIII I  ~~a;q>>~BBBrcv tjtt|Sr)_chain from_iterable_starmap_repeatrlrs relementszCounter.elementsrs, "#HWdjjll$C$CDDDrc td)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)r;rvs rrzCounter.fromkeyss" NPP Prc D |t|tjrX|r4|j}|D]\}}|||dz||<n2t |nt|||r||dSdSr)rrMappingrrlrrr)rrr=self_getrcountr{s rrzCounter.updates &  ($4$<== 0-#xH'/~~'7'7?? e%*XXdA->->%>T ?GGNN8,,,,h///   KK       rc  |e|j}t|tjr-|D]\}}||d|z ||<n|D]}||ddz ||<|r||dSdSr)rrrrrlsubtract)rrr=rrrs rrzCounter.subtracts   xH($4$<== 7#+>>#3#3;;KD%!)$!2!2U!:DJJ;%77D!)$!2!2Q!6DJJ  MM$       rc. ||Srrrs rrz Counter.copys ~~d###rc0|jt|ffSr)r{r5rs rrzCounter.__reduce__s~T },,rcX ||vr#t|dSdSr)rrO)rrr{s rrOzCounter.__delitem__s4Q 4<< GG   % % % % % .=II1qII!47eAh&IIIIIIIrrrrrrs``rrzCounter.__eq__ sIG%)) "! !IIIIIu IIIIIIrcJ t|tstS||k Srrrrrs rrzCounter.__ne__s*J%)) "! !5=  rc| ttstStfdfDS)Nc3FK|]}|D]}||kVdSrr$rs rrz!Counter.__le__..rrr rs``r__le__zCounter.__le__sID%)) "! !IIIIIu IIIIIIrcT t|tstS||ko||kSrr"rs r__lt__zCounter.__lt__s0K%)) "! !u}..rc| ttstStfdfDS)Nc3FK|]}|D]}||kVdSrr$rs rrz!Counter.__ge__..&rrr rs``r__ge__zCounter.__ge__"sIF%)) "! !IIIIIu IIIIIIrcT t|tstS||ko||kSrr"rs r__gt__zCounter.__gt__(s0M%)) "! !u}..rc t|tstSt}|D]\}}|||z}|dkr|||<|D]\}}||vr |dkr|||<|SrrrrrlrrArsrrnewcounts r__add__zCounter.__add__.s %)) "! !::<< ( (KD%uT{*H!||'t  ;;== % %KD%4EAII$t  rc t|tstSt}|D]\}}|||z }|dkr|||<|D]\}}||vr|dkrd|z ||<|Srr.r/s r__sub__zCounter.__sub__As %)) "! !::<< ( (KD%uT{*H!||'t  ;;== ) )KD%4EAII 5yt  rc t|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|D]\}}||vr |dkr|||<|Srr.rrArsrr other_countr0s rrzCounter.__or__Ts %)) "! !::<< ( (KD%+K&+k&9&9{{uH!||'t  ;;== % %KD%4EAII$t  rc t|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|Srr.r5s r__and__zCounter.__and__hsy %)) "! !::<< ( (KD%+K % 3 3uuH!||'t  rcn t}|D]\}}|dkr|||<|Srrrlrrsrrs r__pos__zCounter.__pos__ysAO::<< % %KD%qyy$t  rct t}|D]\}}|dkrd|z ||<|Srr:r;s r__neg__zCounter.__neg__sI ::<< ) )KD%qyy 5yt  rcT d|D}|D]}||=|S)Nc$g|] \}}|dk |S)r r$)rrrs r z*Counter._keep_positive..s!MMM e5199t999r)rl)r nonpositivers r_keep_positivezCounter._keep_positives=MMMtzz||MMM   DT  rc |D]\}}||xx|z cc<|SrrlrCrrArrs r__iadd__zCounter.__iadd__N !;;==  KD% JJJ% JJJJ""$$$rc |D]\}}||xx|zcc<|SrrErFs r__isub__zCounter.__isub__rHrc |D]\}}||}||kr|||<|SrrE)rrArr6rs rrzCounter.__ior__sU "' ) ) D+JEU""(T ""$$$rc |D]\}}||}||kr|||<|SrrE)rrArrr6s r__iand__zCounter.__iand__sT  ::<< ) )KD%+KU""(T ""$$$rr)"r!r"r#rBrrrr rrrrrrrOr}rrr%r'r*r,r1r3rr8r<r>rCrGrJrrM __classcell__rs@rrrs1*d & & & & & & """CCCC EEE, P P P[ P      D    6$$$---&&&&& 3 3 3ZJJJ !!! JJJ /// JJJ /// &&("    % % % % % % % % % % % % % % % %rrceZdZ dZdZdZddZdZdZdZ d Z e d Z e d Zd ZeZdd ZedZdZdZdZdZdZdZdZdZdS)rc6 t|pig|_dSr)r|maps)rrQs rrBzChainMap.__init__s! JJ&2$ rc t|r)rXr(s rrzChainMap.__missing__ssmmrct|jD]} ||cS#t$rYwxYw||Sr)rQrXr)rr)rs r __getitem__zChainMap.__getitem__s\y  G s|###    $$$s  ""Nc||vr||n|Srr$rus rrz ChainMap.gets4KKtCyyW4rcRttj|jSr)rcrunionrQrs r__len__zChainMap.__len__s;355; *+++rci}t|jD]/}|t|0t |Sr)rrQrr5rr)rrrs rrSzChainMap.__iter__sL  ** - -G HHT]]7++ , , , ,AwwrcDtfd|jDS)Nc3 K|]}|vV dSrr$)rmr)s rrz(ChainMap.__contains__..s'//3!8//////ranyrQr(s `r __contains__zChainMap.__contains__s(////TY//////rc*t|jSrr]rs r__bool__zChainMap.__bool__49~~rc||jjddtt|jdS)Nryrrz)r{r!rrreprrQrs rr}zChainMap.__repr__s6.)NNDIIc$ 6J6J,K,KNNNNrc: |tj|g|RSr)r5r)r;rr<s rrzChainMap.fromkeyss'Is4=1D111222rct |j|jdg|jddRSr)r{rQrrs rrz ChainMap.copy s;Rt~dil//11BDIabbMBBBBrc b ||}n|r|||j|g|jRSr)rr{rQ)rr\kwargss r new_childzChainMap.new_childsK  9AA   HHV   t~a,$),,,,rc2 |j|jddS)Nr_)r{rQrs rparentszChainMap.parentss%t~ty}--rc&||jd|<dSr)rQ)rr)rDs rrIzChainMap.__setitem__!s! ! Srcd |jd|=dS#t$rtd|wxYwNr z$Key not found in the first mapping: )rQrXr(s rrOzChainMap.__delitem__$sR K ! S!!! K K KI#IIJJ J Ks/c~ |jdS#t$rtdwxYw)Nr z#No keys found in the first mapping.)rQrYrXrs rrYzChainMap.popitem*sQZ B9Q<'')) ) B B B@AA A Bs"<cx |jdj|g|RS#t$rtd|wxYwrn)rQrKrX)rr)r<s rrKz ChainMap.pop1sba K#49Q<#C/$/// / K K KI#IIJJ J Ks9cF |jddSr)rQrVrs rrVzChainMap.clear8s#1 ! rcF|jd||Sr)rQrrs rrzChainMap.__ior__<s! ! E""" rct|tjstS|}|jd||Sr)rrrrrrQr)rrAr\s rrzChainMap.__or__@sJ%!1!9:: "! ! IIKK q rct|tjstSt |}t |jD]}||||Sr) rrrrr5rrQrr{)rrAr\childs rrzChainMap.__ror__Gse%!1!9:: "! ! KKdi((  E HHUOOOO~~a   rr)r!r"r#rBrrTrrXrSr_rarr}rrr__copy__rirrkrIrOrYrKrVrrrr$rrrrs '''%%%5555,,, 000_OOO33[3CCCH - - - -..X."""KKK BBBKKK!!!!!rrcveZdZddZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZeddZdS)rNc ti|_||||r||dSdSr)datar)rr5rhs rrBzUserDict.__init__WsK   KK     KK       rc*t|jSrrcryrs rrXzUserDict.__len__^rbrc||jvr |j|St|jdr|j||St |)Nr)ryhasattrr{rrXr(s rrTzUserDict.__getitem__asS $)  9S> ! 4>= 1 1 9>--dC88 8smmrc||j|<dSrry)rr)items rrIzUserDict.__setitem__hs #rc|j|=dSrrr(s rrOzUserDict.__delitem__ks IcNNNrc*t|jSr)rryrs rrSzUserDict.__iter__nDIrc||jvSrrr(s rr_zUserDict.__contains__rsdirc*t|jSrrdryrs rr}zUserDict.__repr__vrrct|tr"||j|jzSt|tr||j|zSt Srrrr{ryr5rrs rrzUserDict.__or__ys` eX & & :>>$)ej"899 9 eT " " 5>>$)e"344 4rct|tr"||j|jzSt|tr|||jzSt Srrrs rrzUserDict.__ror__s` eX & & :>>%*ty"899 9 eT " " 5>>%$)"344 4rc|t|tr|xj|jzc_n|xj|zc_|Sr)rrryrs rrzUserDict.__ior__s= eX & &  II #III II II rc|j|j}|j|j|jd|jd<|SNry)r{r6rdrrrinsts rrvzUserDict.__copy__sU~%%dn55 T]+++ $ f 5 : : < < f rc|jtur&t|jSddl}|j} i|_||}||_n #||_wxYw|||Sr)r{rryrr)rrryrs rrz UserDict.copys >X % %DINN,,-- - y DI $ADIIDI     s A%% A.c.|}|D]}|||<|Srr$)r;rrDrr)s rrzUserDict.fromkeyss, CEE  CAcFFrr)r!r"r#rBrXrTrIrOrSr_r}rrrrvrrrr$rrrrTs          [rrceZdZ d!dZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZeZdZdZdZdZd"dZdZdZdZdZdZdZdZ d Z!dS)#rNc g|_|yt|t|jkr||jdd<dSt|tr|jdd|jdd<dSt ||_dSdSr)ryrrrr|)rinitlists rrBzUserList.__init__s  H~~di00' !!! Hh// +'}QQQ/ !!!  NN  rc*t|jSrrrs rr}zUserList.__repr__rrc>|j||kSrry_UserList__castrs rr'zUserList.__lt__y4;;u----rc>|j||kSrrrs rr%zUserList.__le__yDKK....rc>|j||kSrrrs rrzUserList.__eq__rrc>|j||kSrrrs rr,zUserList.__gt__rrc>|j||kSrrrs rr*zUserList.__ge__rrc>t|tr|jn|Sr)rrryrs r__castzUserList.__casts'x88CuzzeCrc||jvSrrrrs rr_zUserList.__contains__sty  rc*t|jSrr{rs rrXzUserList.__len__rbrct|tr ||j|S|j|Sr)rslicer{ryris rrTzUserList.__getitem__s8 a   >>$)A,// /9Q< rc||j|<dSrrrrrs rrIzUserList.__setitem__s ! rc|j|=dSrrrs rrOzUserList.__delitem__s IaLLLrcBt|tr"||j|jzSt|t |jr||j|zS||jt |zSrrrr{ryrr|rs rr1zUserList.__add__s eX & & 5>>$)ej"899 9 tDI / / 5>>$)e"344 4~~di$u++5666rcBt|tr"||j|jzSt|t |jr|||jzS|t ||jzSrrrs r__radd__zUserList.__radd__s eX & & 5>>%*ty"899 9 tDI / / 5>>%$)"344 4~~d5kkDI5666rct|tr|xj|jz c_nPt|t|jr|xj|z c_n|xjt |z c_|Sr)rrryrr|rs rrGzUserList.__iadd__so eX & & % II #III tDI / / % II III IIe $II rc<||j|zSrr{ryrrfs r__mul__zUserList.__mul__~~di!m,,,rc&|xj|zc_|Srrrs r__imul__zUserList.__imul__s Q  rc|j|j}|j|j|jddd|jd<|Sr)r{r6rdrrs rrvzUserList.__copy__sR~%%dn55 T]+++ $ f 5aaa 8 f rc:|j|dSr)ryappendrs rrzUserList.append  rc<|j||dSr)ryinsertrs rrzUserList.insert s  D!!!!!rc6|j|Sr)ryrKrs rrKz UserList.popsy}}Qrc:|j|dSr)ryremovers rrzUserList.removerrc8|jdSr)ryrVrs rrVzUserList.clears rc,||Srrrs rrz UserList.copys~~d###rc6|j|Sr)ryrrs rrzUserList.countsyt$$$rc(|jj|g|RSrryr)rrr<s rrzUserList.indexstyt+d++++rc8|jdSr)ryrrs rrzUserList.reverse"s rc*|jj|i|dSr)rysortrr<r=s rrz UserList.sort%s! %%%%%%rct|tr!|j|jdS|j|dSr)rrryextendrs rrzUserList.extend(sN eX & & $ I  UZ ( ( ( ( ( I  U # # # # #rrr)"r!r"r#rBr}r'r%rr,r*rr_rXrTrIrOr1rrGr__rmul__rrvrrrKrrVrrrrrrr$rrrrsK + + + +...//////...///DDD!!!   777777---H"""    $$$%%%,,,&&&$$$$$rrc4eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZeZdZdZdZdZdZdejfdZdZdZ dKdZ!dejfd Z"dLd"Z#dejfd#Z$d$Z%d%Z&dejfd&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3d3Z4d4Z5d5Z6dMd7Z7e8j9Z9d8Z:dNd:Z;dejfd;Zd>Z?dMd?Z@dOd@ZAdOdAZBdPdCZCdejfdDZDdMdEZEdFZFdGZGdHZHdIZIdJZJd6S)Qrct|tr ||_dSt|tr|jdd|_dSt||_dSr)rrryrrseqs rrBzUserString.__init__5sW c3   !DIII Z ( ( ! DIIICDIIIrc*t|jSr)rryrs r__str__zUserString.__str__=rbrc*t|jSrrrs rr}zUserString.__repr__@rrc*t|jSr)intryrs r__int__zUserString.__int__Crbrc*t|jSr)floatryrs r __float__zUserString.__float__FsTYrc*t|jSr)complexryrs r __complex__zUserString.__complex__Isty!!!rc*t|jSr)hashryrs r__hash__zUserString.__hash__Lrrc"|jddfSrrrs rrzUserString.__getnewargs__Os !!! rcbt|tr|j|jkS|j|kSrrrryrstrings rrzUserString.__eq__R0 fj ) ) ,9 + +yF""rcbt|tr|j|jkS|j|kSrrrs rr'zUserString.__lt__W0 fj ) ) +9v{* *y6!!rcbt|tr|j|jkS|j|kSrrrs rr%zUserString.__le__\rrcbt|tr|j|jkS|j|kSrrrs rr,zUserString.__gt__arrcbt|tr|j|jkS|j|kSrrrs rr*zUserString.__ge__frrcLt|tr|j}||jvSrr)rchars rr_zUserString.__contains__ks( dJ ' ' 9Dty  rc*t|jSrr{rs rrXzUserString.__len__prbrcB||j|Srr)rrs rrTzUserString.__getitem__ss~~di.///rc(t|tr"||j|jzSt|tr||j|zS||jt |zSr)rrr{ryrrs rr1zUserString.__add__vsy eZ ( ( 5>>$)ej"899 9 s # # 5>>$)e"344 4~~di#e**4555rct|tr|||jzS|t||jzSr)rrr{ryrs rrzUserString.__radd__}sL eS ! ! 5>>%$)"344 4~~c%jj494555rc<||j|zSrrrs rrzUserString.__mul__rrc<||j|zSrrrr<s r__mod__zUserString.__mod__s~~di$.///rcL|t||zSr)r{r)rtemplates r__rmod__zUserString.__rmod__s~~c(mmd2333rcZ||jSr)r{ry capitalizers rrzUserString.capitalizes"~~di2244555rcZ||jSr)r{rycasefoldrs rrzUserString.casefold"~~di0022333rcN||jj|g|RSr)r{rycenterrwidthr<s rrzUserString.centers,~~.di.u>> !dl0000 >>> >>> 2222 &'DL6666==== T\//// ///--- !dl0000#########%%%###(((###%%%'''############===1117777 I(((EEEE !dl0000 !"t|1111===)))7777....////....()dl88886666444111:::11166666rr)3__all__rsysra itertoolsr rr r rr keywordrroperatorrrrrreprlibrr_weakrefrr8 _collectionsr MutableSequenceregister ImportErrorrKeysViewr ItemsViewr& ValuesViewr+rr.r5rrr rrrrrrSequencerr$rrr}sF   %%%%%%''''''))))))++++++......555555$$$$$$5""""""$--e4444   D  (((((((   D ++++++4+++ ,,,,,,6,,, %%%%%-8%%% 55555F555}}}}}$}}}@ (((((((   D L)))))))LLLKKLLLL16Thhhhh^111  ,,,,,,,   D q%q%q%q%q%dq%q%q%p }!}!}!}!}!.}!}!}!HSSSSS.SSSt~$~$~$~$~$/~$~$~$Ju6u6u6u6u6!*u6u6u6u6u6sYA A('A(,A33A;:A;CC#"C#'C..C98C9DDDPK!Cܝ11$__pycache__/__init__.cpython-311.pycnu[ !A?h2dZgdZddlZddlZddlmZddlmZ ddlm Z ddl m ZddlmZdd lmZdd lmZdd lmZ dd lmZejen #e$rYnwxYw dd lmZn #e$rYnwxYwGddej Z!Gddej"Z#Gddej$Z%Gdde&Z'Gdde(Z) ddlm)Z)n #e$rYnwxYw ddlm*Z*n#e$rdZ*YnwxYwdddddZ+dZ, ddlm,Z,n #e$rYnwxYwGd d!e(Z-Gd"d#ej.Z/Gd$d%ej.Z0Gd&d'ejZ1Gd(d)ej2Z3dS)*a?This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * ChainMap dict-like class for creating a single view of multiple mappings * Counter dict subclass for counting hashable objects * OrderedDict dict subclass that remembers the order entries were added * defaultdict dict subclass that calls a factory function to supply missing values * UserDict wrapper around dictionary objects for easier dict subclassing * UserList wrapper around list objects for easier list subclassing * UserString wrapper around string objects for easier string subclassing ) ChainMapCounter OrderedDictUserDictUserList UserString defaultdictdeque namedtupleN)chain)repeat)starmap) iskeyword)eq) itemgetter)recursive_repr)proxy)r )rceZdZdZdS)_OrderedDictKeysViewc#>Kt|jEd{VdSNreversed_mappingselfs A/opt/alt/python-internal/lib64/python3.11/collections/__init__.py __reversed__z!_OrderedDictKeysView.__reversed__<s.DM***********N__name__ __module__ __qualname__rrrrr:s#+++++rrceZdZdZdS)_OrderedDictItemsViewc#ZKt|jD]}||j|fVdSrrrkeys rrz"_OrderedDictItemsView.__reversed__AsDDM** , ,C c*+ + + + + , ,rNr r$rrr&r&?s#,,,,,rr&ceZdZdZdS)_OrderedDictValuesViewc#VKt|jD]}|j|VdSrrr(s rrz#_OrderedDictValuesView.__reversed__Gs?DM** % %C-$ $ $ $ $ % %rNr r$rrr+r+Es#%%%%%rr+ceZdZdZdS)_Link)prevnextr) __weakref__N)r!r"r# __slots__r$rrr.r.Ks4IIIrr.cBeZdZdZdZddZejee fdZej fdZ dZ dZ d Z dd Zdd Zd ZejjxZZdZdZdZejjZeZefdZddZedZdZdZ e!ddZ"dZ#dZ$dZ%dZ&dS)rz)Dictionary that remembers insertion orderct|}t|_t |jx|_}|x|_|_i|_|S)zDCreate the ordered dict object and set up the underlying structures.) dict__new__r._OrderedDict__hardroot_proxy_OrderedDict__rootr/r0_OrderedDict__map)clsargskwdsrroots rr6zOrderedDict.__new__]sN||C  ''#DO444 d $$ DI  rr$c "|j|fi|dS)zInitialize an ordered dictionary. The signature is the same as regular dictionaries. Keyword argument order is preserved. N)_OrderedDict__update)rotherr=s r__init__zOrderedDict.__init__fs$  e$$t$$$$$rc||vrO|x|j|<}|j}|j}|||c|_|_|_||_|||_||||dS)z!od.__setitem__(i, y) <==> od[i]=yN)r:r9r/r0r)) rr)value dict_setitemrLinklinkr>lasts r __setitem__zOrderedDict.__setitem__lsw d??%)TVV +DJsOd;D9D-14 *DIty$(DId DI T3&&&&&rc||||j|}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r:popr/r0)rr) dict_delitemrG link_prev link_nexts r __delitem__zOrderedDict.__delitem__zsW  T3z~~c""I I " "   rc#ZK|j}|j}||ur|jV|j}||udSdS)zod.__iter__() <==> iter(od)N)r9r0r)rr>currs r__iter__zOrderedDict.__iter__L{y$(NNN9D$rc#ZK|j}|j}||ur|jV|j}||udSdS)z#od.__reversed__() <==> reversed(od)N)r9r/r)rQs rrzOrderedDict.__reversed__rTrc|j}|x|_|_|jt |dS)z.od.clear() -> None. Remove all items from od.N)r9r/r0r:clearr5)rr>s rrWzOrderedDict.clearsC{ $$ DI  4rTc|std|j}|r|j}|j}||_||_n|j}|j}||_||_|j}|j|=t ||}||fS)zRemove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order if last is true or FIFO order if false. zdictionary is empty)KeyErrorr9r/r0r)r:r5rK)rrHr>rGrMrNr)rDs rpopitemzOrderedDict.popitems  2011 1{  "9D I!IN!DII9D I!DI!INh JsOs##Ezrc|j|}|j}|j}|j}||_||_|j}|r%|j}||_||_||_||_dS|j}||_||_||_||_dS)zMove an existing element to the end (or beginning if last is false). Raise KeyError if the element does not exist. N)r:r/r0r9) rr)rHrGrMrN soft_linkr>firsts r move_to_endzOrderedDict.move_to_ends z#I I N " " {  9DDIDI!DIDIIIIEDIDI"EJDIIIrctj}t|dz}||j}|||jdzz }|||j|zz }|||j|zz }|S)N)_sys getsizeoflen__dict__r:r7r9)rsizeofnsizes r __sizeof__zOrderedDict.__sizeof__s IIMvdm$$ tz""Q&& t''!++ t{##a'' rc t|S)z:D.keys() -> a set-like object providing a view on D's keys)rrs rkeyszOrderedDict.keyss#D)))rc t|S)z a set-like object providing a view on D's items)r&rs ritemszOrderedDict.itemss$T***rc t|S)z6D.values() -> an object providing a view on D's values)r+rs rvalueszOrderedDict.valuess%d+++rc|j}t|||}||urF|j|}|j}|j}||_||_d|_d|_|S||urt ||S)zod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. N)_OrderedDict__markerr5rKr:r/r0rY)rr)defaultmarkerresultrGrMrNs rrKzOrderedDict.pops $V,,   :>>#&&D I I&IN&INDIDIM f  3-- rNc(||vr||S|||<|S)zInsert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. r$rr)rrs r setdefaultzOrderedDict.setdefaults% $;;9 S rc|s|jjdS|jjdt|dS)zod.__repr__() <==> repr(od)()()) __class__r!listrmrs r__repr__zOrderedDict.__repr__ sL 7!^4446 6>222D4F4F4F4FGGrc|}|rt|tr|\}}ni}|}|}t t D].}||d||d/|r||f}n|pd}|jd|dt| fS)z%Return state information for picklingNr$) __getstate__ isinstancetuplecopyvarsrrKr|iterrm)rstateslotsks r __reduce__zOrderedDict.__reduce__s!!##  &%'' $ uuJJLLEJJLLE+--(( # # !T""" !T"""" &u  ~r5$TZZ\\0B0BBBrc,||S)z!od.copy() -> a shallow copy of odr|rs rrzOrderedDict.copy%~~d###rc.|}|D]}|||<|S)zYCreate a new ordered dictionary with keys from iterable and values set to value. r$)r;iterablerDrr)s rfromkeyszOrderedDict.fromkeys)s.suu  CDII rct|tr>t||o"t t t ||St||S)zod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. )rrr5__eq__allmap_eqrrAs rrzOrderedDict.__eq__2sX e[ ) ) K;;tU++JCT54I4I0J0J J{{4'''rc0|||Sr)updaters r__ior__zOrderedDict.__ior__;s E rct|tstS||}|||Srrr5NotImplementedr|rrrAnews r__or__zOrderedDict.__or__?sB%&& "! !nnT"" 5 rct|tstS||}|||Srrrs r__ror__zOrderedDict.__ror__FsB%&& "! !nnU## 4 r)r$)Tr)'r!r"r#__doc__r6rBr5rIr8r.rOrSrrWrZr^ri_collections_abcMutableMappingrr@rkrmro__ne__objectrqrKrw_recursive_reprr~rr classmethodrrrrrr$rrrrNs//%%%%"&!1e ' ' ' '-1,<    .2)7>>FX***+++,,, , 3FvxxH',_HHH CCC&$$$[(((rr)r) _tuplegetterc>tt||S)N)doc)property _itemgetter)indexrs rr\sh{5/A/As&K&K&KrF)renamedefaultsmodulec  ttr(ddt t tt jt|}|r|t}tD]^\}}| r(t|s| ds||vrd||<| |_|gzD]n}t|turtd| st!d|t|rt!d|ot}D]V}| dr|st!d|||vrt!d|| |Wi}|t#|}t%|t%krtd t't)t t+t)t)|}t#t t jt%d } d kr| dz } d d dDzdzt"jt&t"t$t t*f\id|d} d| d| d} t1| | } d| _d|d | d| _||| _t8fd} d|d| j_fd}d|d|_fd}fd}fd}| | j||||fD]}|d |j|_|d | dd!|| | ||||d" }tD]/\}}t jd#|}t?||||<0t|t"f|}|F t j d j!"d$d%}n#tFt f$rYnwxYw|||_$|S)&aCReturns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) , _z*Type names and field names must be stringsz6Type names and field names must be valid identifiers: z0Type names and field names cannot be a keyword: z-Field names cannot start with an underscore: z"Encountered duplicate field name: Nz(Got more default values than field names, r`rzc3 K|] }|dV dS)z=%rNr$).0names r znamedtuple..s(DD$|||DDDDDDrr{ namedtuple_) _tuple_new __builtins__r!z lambda _cls, z: _tuple_new(_cls, (z))r6zCreate new instance of c||}|kr"tddt||S)Nz Expected z arguments, got ) TypeErrorrd)r;rrt_len num_fields tuple_news r_makeznamedtuple.._makesQ3)) 4<<: % %Q QQCKKQQRR R rz Make a new z# object from a sequence or iterablec||j|}|rtdt||S)NzGot unexpected field names: )rrK ValueErrorr})rr=rt_map field_namess r_replaceznamedtuple.._replacesODD;==>>  LJDJJJJKK K rz Return a new z2 object replacing specified fields with new valuesc(|jj|zzS)z/Return a nicely formatted representation string)r|r!)rrepr_fmts rr~znamedtuple..__repr__s~&D88rc8|j|S)z9Return a new dict which maps field names to their values.)_fields)r_dict_zips r_asdictznamedtuple.._asdicts!uTT$,--...rc|S)z7Return self as a plain tuple. Used by copy and pickle.r$)r_tuples r__getnewargs__z"namedtuple..__getnewargs__svd||r.r$) rr2r_field_defaultsr6rrr~rr__match_args__zAlias for field number r!__main__)%rstrreplacesplitr}rrbinternset enumerate isidentifier _iskeyword startswithaddtyperrrrdr5rzipjoinr6evalr!r __defaults__r__func__r#r _getframe f_globalsgetAttributeErrorr")typenamerrrrseenrrfield_defaultsarg_list namespacecoder6rrr~rrmethodclass_namespacerrtrrrrrrrrs ` @@@@@@@@rr r ^s4+s##<!))#s3399;; s3 ,,--K{3x==))H uu$[11  KE4%%'' 1d## 1??3'' 14<<%0[[ E" HHTNNNN [(33 ::S HII I  "" 76-16677 7 d   32)-2233 3 3 55D ??3   * *) $))** * 4<<J$JJKK K N?? x==3{++ + +FGG GhtC0E0E080B0B-D-D(E(EFFGGDK5566K[!!Jyy%%HQCTYYDD DDDDDDsJH I&*E3S&@#E64t  ,(,,I F8 E E E E ED4##G GFFF8FFFGO'[ ,H,,,EN 1111H99999//////   >>"*==FO== ,,,,,)(%  O!--99 tk;E;;<< ,UC 8 8 (UHo 6 6F~ ^A&&044ZLLFF +    D  " Ms7-Q%%Q98Q9cB|j}|D]}||ddz||<dS)z!Tally elements from the iterable.r r`N)r)mappingr mapping_getelems r_count_elementsr s>+K11# D!,,q0 11r)rceZdZdZd fd ZdZdZd dZdZe d dZ d fd Z d d Z d Z d Zfd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!xZ"S)!raDict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values. >>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] Nc dt|j|fi|dS)a Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args N)superrBr)rrr=r|s rrBzCounter.__init__Ks;  H%%%%%%%rcdS)z1The count of elements not in the Counter is zero.r r$r(s r __missing__zCounter.__missing__Ys qrcDt|S)zSum of the counts)sumrors rtotalz Counter.total^s4;;==!!!rc|1t|tddSddl}|||tdS)zList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abracadabra').most_common(3) [('a', 5), ('b', 2), ('r', 2)] Nr`T)r)reverser )r))sortedrmrheapqnlargest)rrgrs r most_commonzCounter.most_commonbs] 9$**,,KNNDIII I  ~~a;q>>~BBBrcttjtt|S)aIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> import math >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> math.prod(prime_factors.elements()) 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. )_chain from_iterable_starmap_repeatrmrs relementszCounter.elementsrs'$#HWdjjll$C$CDDDrc td)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)r;rvs rrzCounter.fromkeyss" NPP Prc B|t|tjrX|r4|j}|D]\}}|||dz||<n2t |nt|||r||dSdS)aLike dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 Nr )rrMappingrrmrrr)rrr=self_getrcountr|s rrzCounter.updates(  ($4$<== 0-#xH'/~~'7'7?? e%*XXdA->->%>T ?GGNN8,,,,h///   KK       rc |e|j}t|tjr-|D]\}}||d|z ||<n|D]}||ddz ||<|r||dSdS)aLike dict.update() but subtracts counts instead of replacing them. Counts can be reduced below zero. Both the inputs and outputs are allowed to contain zero and negative counts. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 Nr r`)rrrrrmsubtract)rrr=rrrs rrzCounter.subtracts  xH($4$<== 7#+>>#3#3;;KD%!)$!2!2U!:DJJ;%77D!)$!2!2Q!6DJJ  MM$       rc,||S)zReturn a shallow copy.rrs rrz Counter.copyrrc0|jt|ffSr)r|r5rs rrzCounter.__reduce__s~T },,rcV||vr#t|dSdS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)rrO)rrr|s rrOzCounter.__delitem__s1 4<< GG   % % % % % .=II1qII!47eAh&IIIIIIIrrrrrrs``rrzCounter.__eq__ F%)) "! !IIIIIu IIIIIIrcHt|tstS||k S)z@True if any counts disagree. Missing counts are treated as zero.rrrrs rrzCounter.__ne__s'%)) "! !5=  rczttstStfdfDS)z:True if all counts in self are a subset of those in other.c3FK|]}|D]}||kVdSrr$rs rrz!Counter.__le__..rrr rs``r__le__zCounter.__le__r!rcRt|tstS||ko||kS)zATrue if all counts in self are a proper subset of those in other.r#rs r__lt__zCounter.__lt__-%)) "! !u}..rczttstStfdfDS)z.&rrr rs``r__ge__zCounter.__ge__"r!rcRt|tstS||ko||kS)zCTrue if all counts in self are a proper superset of those in other.r#rs r__gt__zCounter.__gt__(r)rc t|tstSt}|D]\}}|||z}|dkr|||<|D]\}}||vr |dkr|||<|S)zAdd counts from two counters. >>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) r rrrrmrrArtrrnewcounts r__add__zCounter.__add__.s%)) "! !::<< ( (KD%uT{*H!||'t  ;;== % %KD%4EAII$t  rct|tstSt}|D]\}}|||z }|dkr|||<|D]\}}||vr|dkrd|z ||<|S)z Subtract count, but keep only results with positive counts. >>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) r r0r1s r__sub__zCounter.__sub__As%)) "! !::<< ( (KD%uT{*H!||'t  ;;== ) )KD%4EAII 5yt  rct|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|D]\}}||vr |dkr|||<|S)zUnion is the maximum of value in either of the input counters. >>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) r r0rrArtrr other_countr2s rrzCounter.__or__Ts%)) "! !::<< ( (KD%+K&+k&9&9{{uH!||'t  ;;== % %KD%4EAII$t  rct|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|S)z Intersection is the minimum of corresponding counts. >>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) r r0r7s r__and__zCounter.__and__hst%)) "! !::<< ( (KD%+K % 3 3uuH!||'t  rclt}|D]\}}|dkr|||<|S)zEAdds an empty counter, effectively stripping negative and zero countsr rrmrrtrrs r__pos__zCounter.__pos__ys>::<< % %KD%qyy$t  rcrt}|D]\}}|dkrd|z ||<|S)z{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. r r<r=s r__neg__zCounter.__neg__sD ::<< ) )KD%qyy 5yt  rcRd|D}|D]}||=|S)z?Internal method to strip elements with a negative or zero countc$g|] \}}|dk |S)r r$)rrrs r z*Counter._keep_positive..s!MMM e5199t999r)rm)r nonpositivers r_keep_positivezCounter._keep_positives:MMtzz||MMM   DT  rc~|D]\}}||xx|z cc<|S)zInplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) rmrErrArrs r__iadd__zCounter.__iadd__I!;;==  KD% JJJ% JJJJ""$$$rc~|D]\}}||xx|zcc<|S)zInplace subtract counter, but keep only results with positive counts. >>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) rGrHs r__isub__zCounter.__isub__rJrc|D]\}}||}||kr|||<|S)zInplace union is the maximum of value from either counter. >>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) rG)rrArr8rs rrzCounter.__ior__sP"' ) ) D+JEU""(T ""$$$rc|D]\}}||}||kr|||<|S)zInplace intersection is the minimum of corresponding counts. >>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) rG)rrArrr8s r__iand__zCounter.__iand__sO ::<< ) )KD%+KU""(T ""$$$rr)#r!r"r#rrBrrrr rrrrrrrOr~rrr&r(r,r.r3r5rr:r>r@rErIrLrrO __classcell__rs@rrrs6**d & & & & & & """CCCC EEE, P P P[ P      D    6$$$---&&&&& 3 3 3ZJJJ !!! JJJ /// JJJ /// &&("    % % % % % % % % % % % % % % % %rrceZdZdZdZdZdZddZdZdZ d Z d Z e d Z ed Zd ZeZddZedZdZdZdZdZdZdZdZdZdS)ra A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can be accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. c4t|pig|_dS)zInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N)r}maps)rrSs rrBzChainMap.__init__s JJ&2$ rc t|r)rYr(s rrzChainMap.__missing__ssmmrct|jD]} ||cS#t$rYwxYw||Sr)rSrYr)rr)rs r __getitem__zChainMap.__getitem__s\y  G s|###    $$$s  ""Nc||vr||n|Srr$rvs rrz ChainMap.gets4KKtCyyW4rcRttj|jSr)rdrunionrSrs r__len__zChainMap.__len__s;355; *+++rci}t|jD]/}|t|0t |Sr)rrSrr5rr)rrrs rrSzChainMap.__iter__sL  ** - -G HHT]]7++ , , , ,AwwrcDtfd|jDS)Nc3 K|]}|vV dSrr$)rmr)s rrz(ChainMap.__contains__..s'//3!8//////ranyrSr(s `r __contains__zChainMap.__contains__s(////TY//////rc*t|jSrr_rs r__bool__zChainMap.__bool__49~~rc||jjddtt|jdS)Nrzrr{)r|r!rrreprrSrs rr~zChainMap.__repr__s6.)NNDIIc$ 6J6J,K,KNNNNrc8|tj|g|RS)z?Create a ChainMap with a single dict created from the iterable.)r5r)r;rr<s rrzChainMap.fromkeyss&s4=1D111222rcr|j|jdg|jddRS)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r r`N)r|rSrrs rrz ChainMap.copy s8t~dil//11BDIabbMBBBBrc `||}n|r|||j|g|jRS)zNew ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. Keyword arguments update the map or new empty dict. )rr|rS)rr^kwargss r new_childzChainMap.new_childsF 9AA   HHV   t~a,$),,,,rc0|j|jddS)zNew ChainMap from maps[1:].r`N)r|rSrs rparentszChainMap.parentsst~ty}--rc&||jd|<dSNr )rS)rr)rDs rrIzChainMap.__setitem__!s! ! Srcd |jd|=dS#t$rtd|wxYw)Nr $Key not found in the first mapping: )rSrYr(s rrOzChainMap.__delitem__$sR K ! S!!! K K KI#IIJJ J Ks/c| |jdS#t$rtdwxYw)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r z#No keys found in the first mapping.)rSrZrYrs rrZzChainMap.popitem*sN B9Q<'')) ) B B B@AA A Bs!;cv |jdj|g|RS#t$rtd|wxYw)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r rq)rSrKrY)rr)r<s rrKz ChainMap.pop1s_ K#49Q<#C/$/// / K K KI#IIJJ J Ks8cD|jddS)z'Clear maps[0], leaving maps[1:] intact.r N)rSrWrs rrWzChainMap.clear8s  ! rcF|jd||Sro)rSrrs rrzChainMap.__ior__<s! ! E""" rct|tjstS|}|jd||Sro)rrrrrrSr)rrAr^s rrzChainMap.__or__@sJ%!1!9:: "! ! IIKK q rct|tjstSt |}t |jD]}||||Sr) rrrrr5rrSrr|)rrAr^childs rrzChainMap.__ror__Gse%!1!9:: "! ! KKdi((  E HHUOOOO~~a   rr)r!r"r#rrBrrVrrZrSrarcrr~rrr__copy__rkrrmrIrOrZrKrWrrrr$rrrrs  '''%%%5555,,, 000_OOO33[3CCCH - - - -..X."""KKK BBBKKK!!!!!rrcveZdZddZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZeddZdS)rNc ti|_||||r||dSdSr)datar)rr5rjs rrBzUserDict.__init__WsK   KK     KK       rc*t|jSrrdr|rs rrZzUserDict.__len__^rdrc||jvr |j|St|jdr|j||St |)Nr)r|hasattrr|rrYr(s rrVzUserDict.__getitem__asS $)  9S> ! 4>= 1 1 9>--dC88 8smmrc||j|<dSrr|)rr)items rrIzUserDict.__setitem__hs #rc|j|=dSrrr(s rrOzUserDict.__delitem__ks IcNNNrc*t|jSr)rr|rs rrSzUserDict.__iter__nDIrc||jvSrrr(s rrazUserDict.__contains__rsdirc*t|jSrrfr|rs rr~zUserDict.__repr__vrrct|tr"||j|jzSt|tr||j|zSt Srrrr|r|r5rrs rrzUserDict.__or__ys` eX & & :>>$)ej"899 9 eT " " 5>>$)e"344 4rct|tr"||j|jzSt|tr|||jzSt Srrrs rrzUserDict.__ror__s` eX & & :>>%*ty"899 9 eT " " 5>>%$)"344 4rc|t|tr|xj|jzc_n|xj|zc_|Sr)rrr|rs rrzUserDict.__ior__s= eX & &  II #III II II rc|j|j}|j|j|jd|jd<|SNr|)r|r6rerrrinsts rryzUserDict.__copy__sU~%%dn55 T]+++ $ f 5 : : < < f rc|jtur&t|jSddl}|j} i|_||}||_n #||_wxYw|||Sro)r|rr|rr)rrr|rs rrz UserDict.copys >X % %DINN,,-- - y DI $ADIIDI     s A%% A.c.|}|D]}|||<|Srr$)r;rrDrr)s rrzUserDict.fromkeyss, CEE  CAcFFrr)r!r"r#rBrZrVrIrOrSrar~rrrryrrrr$rrrrTs          [rrceZdZdZd"dZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZeZdZdZdZdZd#dZdZdZdZdZdZdZ d Z!d!Z"dS)$rzAA more or less complete user-defined wrapper around list objects.Nc g|_|yt|t|jkr||jdd<dSt|tr|jdd|jdd<dSt ||_dSdSr)r|rrrr})rinitlists rrBzUserList.__init__s  H~~di00' !!! Hh// +'}QQQ/ !!!  NN  rc*t|jSrrrs rr~zUserList.__repr__rrc>|j||kSrr|_UserList__castrs rr(zUserList.__lt__y4;;u----rc>|j||kSrrrs rr&zUserList.__le__yDKK....rc>|j||kSrrrs rrzUserList.__eq__rrc>|j||kSrrrs rr.zUserList.__gt__rrc>|j||kSrrrs rr,zUserList.__ge__rrc>t|tr|jn|Sr)rrr|rs r__castzUserList.__casts'x88CuzzeCrc||jvSrrrrs rrazUserList.__contains__sty  rc*t|jSrr~rs rrZzUserList.__len__rdrct|tr ||j|S|j|Sr)rslicer|r|ris rrVzUserList.__getitem__s8 a   >>$)A,// /9Q< rc||j|<dSrrrrrs rrIzUserList.__setitem__s ! rc|j|=dSrrrs rrOzUserList.__delitem__s IaLLLrcBt|tr"||j|jzSt|t |jr||j|zS||jt |zSrrrr|r|rr}rs rr3zUserList.__add__s eX & & 5>>$)ej"899 9 tDI / / 5>>$)e"344 4~~di$u++5666rcBt|tr"||j|jzSt|t |jr|||jzS|t ||jzSrrrs r__radd__zUserList.__radd__s eX & & 5>>%*ty"899 9 tDI / / 5>>%$)"344 4~~d5kkDI5666rct|tr|xj|jz c_nPt|t|jr|xj|z c_n|xjt |z c_|Sr)rrr|rr}rs rrIzUserList.__iadd__so eX & & % II #III tDI / / % II III IIe $II rc<||j|zSrr|r|rrgs r__mul__zUserList.__mul__~~di!m,,,rc&|xj|zc_|Srrrs r__imul__zUserList.__imul__s Q  rc|j|j}|j|j|jddd|jd<|Sr)r|r6rerrs rryzUserList.__copy__sR~%%dn55 T]+++ $ f 5aaa 8 f rc:|j|dSr)r|appendrs rrzUserList.append  rc<|j||dSr)r|insertrs rrzUserList.insert s  D!!!!!rc6|j|Sr)r|rKrs rrKz UserList.popsy}}Qrc:|j|dSr)r|removers rrzUserList.removerrc8|jdSr)r|rWrs rrWzUserList.clears rc,||Srrrs rrz UserList.copys~~d###rc6|j|Sr)r|rrs rrzUserList.countsyt$$$rc(|jj|g|RSrr|r)rrr<s rrzUserList.indexstyt+d++++rc8|jdSr)r|rrs rrzUserList.reverse"s rc*|jj|i|dSr)r|sortrr<r=s rrz UserList.sort%s! %%%%%%rct|tr!|j|jdS|j|dSr)rrr|extendrs rrzUserList.extend(sN eX & & $ I  UZ ( ( ( ( ( I  U # # # # #rrr)#r!r"r#rrBr~r(r&rr.r,rrarZrVrIrOr3rrIr__rmul__rryrrrKrrWrrrrrrr$rrrrsKK + + + +...//////...///DDD!!!   777777---H"""    $$$%%%,,,&&&$$$$$rrc4eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZeZdZdZdZdZdZdejfdZdZdZ dKdZ!dejfd Z"dLd"Z#dejfd#Z$d$Z%d%Z&dejfd&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3d3Z4d4Z5d5Z6dMd7Z7e8j9Z9d8Z:dNd:Z;dejfd;Zd>Z?dMd?Z@dOd@ZAdOdAZBdPdCZCdejfdDZDdMdEZEdFZFdGZGdHZHdIZIdJZJd6S)Qrct|tr ||_dSt|tr|jdd|_dSt||_dSr)rrr|rrseqs rrBzUserString.__init__5sW c3   !DIII Z ( ( ! DIIICDIIIrc*t|jSr)rr|rs r__str__zUserString.__str__=rdrc*t|jSrrrs rr~zUserString.__repr__@rrc*t|jSr)intr|rs r__int__zUserString.__int__Crdrc*t|jSr)floatr|rs r __float__zUserString.__float__FsTYrc*t|jSr)complexr|rs r __complex__zUserString.__complex__Isty!!!rc*t|jSr)hashr|rs r__hash__zUserString.__hash__Lrrc"|jddfSrrrs rrzUserString.__getnewargs__Os !!! rcbt|tr|j|jkS|j|kSrrrr|rstrings rrzUserString.__eq__R0 fj ) ) ,9 + +yF""rcbt|tr|j|jkS|j|kSrrrs rr(zUserString.__lt__W0 fj ) ) +9v{* *y6!!rcbt|tr|j|jkS|j|kSrrrs rr&zUserString.__le__\rrcbt|tr|j|jkS|j|kSrrrs rr.zUserString.__gt__arrcbt|tr|j|jkS|j|kSrrrs rr,zUserString.__ge__frrcLt|tr|j}||jvSrr)rchars rrazUserString.__contains__ks( dJ ' ' 9Dty  rc*t|jSrr~rs rrZzUserString.__len__prdrcB||j|Srr)rrs rrVzUserString.__getitem__ss~~di.///rc(t|tr"||j|jzSt|tr||j|zS||jt |zSr)rrr|r|rrs rr3zUserString.__add__vsy eZ ( ( 5>>$)ej"899 9 s # # 5>>$)e"344 4~~di#e**4555rct|tr|||jzS|t||jzSr)rrr|r|rs rrzUserString.__radd__}sL eS ! ! 5>>%$)"344 4~~c%jj494555rc<||j|zSrrrs rrzUserString.__mul__rrc<||j|zSrrrr<s r__mod__zUserString.__mod__s~~di$.///rcL|t||zSr)r|r)rtemplates r__rmod__zUserString.__rmod__s~~c(mmd2333rcZ||jSr)r|r| capitalizers rrzUserString.capitalizes"~~di2244555rcZ||jSr)r|r|casefoldrs rrzUserString.casefold"~~di0022333rcN||jj|g|RSr)r|r|centerrwidthr<s rrzUserString.centers,~~.di.u>> !dl0000 >>> >>> 2222 &'DL6666==== T\//// ///--- !dl0000#########%%%###(((###%%%'''############===1117777 I(((EEEE !dl0000 !"t|1111===)))7777....////....()dl88886666444111:::11166666rr)4r__all__rsysrb itertoolsr rr r rr keywordrroperatorrrrrreprlibrr_weakrefrr8 _collectionsr MutableSequenceregister ImportErrorrKeysViewr ItemsViewr& ValuesViewr+rr.r5rrr rrrrrrSequencerr$rrrsK   %%%%%%''''''))))))++++++......555555$$$$$$5""""""$--e4444   D  (((((((   D ++++++4+++ ,,,,,,6,,, %%%%%-8%%% 55555F555}}}}}$}}}@ (((((((   D L)))))))LLLKKLLLL16Thhhhh^111  ,,,,,,,   D q%q%q%q%q%dq%q%q%p }!}!}!}!}!.}!}!}!HSSSSS.SSSt~$~$~$~$~$/~$~$~$Ju6u6u6u6u6!*u6u6u6u6u6sZA!!A)(A)-A44A<;A<CC$#C$(C//C:9C: DDDPK!<<__pycache__/abc.cpython-311.pycnu[ !A?hw&ddlTddlmZddlmZdS))*)__all__)_CallableGenericAliasN)_collections_abcrrr s;$$$$$$22222222rPK!<<%__pycache__/abc.cpython-311.opt-1.pycnu[ !A?hw&ddlTddlmZddlmZdS))*)__all__)_CallableGenericAliasN)_collections_abcrrr s;$$$$$$22222222rPK!Cܝ11*__pycache__/__init__.cpython-311.opt-1.pycnu[ !A?h2dZgdZddlZddlZddlmZddlmZ ddlm Z ddl m ZddlmZdd lmZdd lmZdd lmZ dd lmZejen #e$rYnwxYw dd lmZn #e$rYnwxYwGddej Z!Gddej"Z#Gddej$Z%Gdde&Z'Gdde(Z) ddlm)Z)n #e$rYnwxYw ddlm*Z*n#e$rdZ*YnwxYwdddddZ+dZ, ddlm,Z,n #e$rYnwxYwGd d!e(Z-Gd"d#ej.Z/Gd$d%ej.Z0Gd&d'ejZ1Gd(d)ej2Z3dS)*a?This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * ChainMap dict-like class for creating a single view of multiple mappings * Counter dict subclass for counting hashable objects * OrderedDict dict subclass that remembers the order entries were added * defaultdict dict subclass that calls a factory function to supply missing values * UserDict wrapper around dictionary objects for easier dict subclassing * UserList wrapper around list objects for easier list subclassing * UserString wrapper around string objects for easier string subclassing ) ChainMapCounter OrderedDictUserDictUserList UserString defaultdictdeque namedtupleN)chain)repeat)starmap) iskeyword)eq) itemgetter)recursive_repr)proxy)r )rceZdZdZdS)_OrderedDictKeysViewc#>Kt|jEd{VdSNreversed_mappingselfs A/opt/alt/python-internal/lib64/python3.11/collections/__init__.py __reversed__z!_OrderedDictKeysView.__reversed__<s.DM***********N__name__ __module__ __qualname__rrrrr:s#+++++rrceZdZdZdS)_OrderedDictItemsViewc#ZKt|jD]}||j|fVdSrrrkeys rrz"_OrderedDictItemsView.__reversed__AsDDM** , ,C c*+ + + + + , ,rNr r$rrr&r&?s#,,,,,rr&ceZdZdZdS)_OrderedDictValuesViewc#VKt|jD]}|j|VdSrrr(s rrz#_OrderedDictValuesView.__reversed__Gs?DM** % %C-$ $ $ $ $ % %rNr r$rrr+r+Es#%%%%%rr+ceZdZdZdS)_Link)prevnextr) __weakref__N)r!r"r# __slots__r$rrr.r.Ks4IIIrr.cBeZdZdZdZddZejee fdZej fdZ dZ dZ d Z dd Zdd Zd ZejjxZZdZdZdZejjZeZefdZddZedZdZdZ e!ddZ"dZ#dZ$dZ%dZ&dS)rz)Dictionary that remembers insertion orderct|}t|_t |jx|_}|x|_|_i|_|S)zDCreate the ordered dict object and set up the underlying structures.) dict__new__r._OrderedDict__hardroot_proxy_OrderedDict__rootr/r0_OrderedDict__map)clsargskwdsrroots rr6zOrderedDict.__new__]sN||C  ''#DO444 d $$ DI  rr$c "|j|fi|dS)zInitialize an ordered dictionary. The signature is the same as regular dictionaries. Keyword argument order is preserved. N)_OrderedDict__update)rotherr=s r__init__zOrderedDict.__init__fs$  e$$t$$$$$rc||vrO|x|j|<}|j}|j}|||c|_|_|_||_|||_||||dS)z!od.__setitem__(i, y) <==> od[i]=yN)r:r9r/r0r)) rr)value dict_setitemrLinklinkr>lasts r __setitem__zOrderedDict.__setitem__lsw d??%)TVV +DJsOd;D9D-14 *DIty$(DId DI T3&&&&&rc||||j|}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r:popr/r0)rr) dict_delitemrG link_prev link_nexts r __delitem__zOrderedDict.__delitem__zsW  T3z~~c""I I " "   rc#ZK|j}|j}||ur|jV|j}||udSdS)zod.__iter__() <==> iter(od)N)r9r0r)rr>currs r__iter__zOrderedDict.__iter__L{y$(NNN9D$rc#ZK|j}|j}||ur|jV|j}||udSdS)z#od.__reversed__() <==> reversed(od)N)r9r/r)rQs rrzOrderedDict.__reversed__rTrc|j}|x|_|_|jt |dS)z.od.clear() -> None. Remove all items from od.N)r9r/r0r:clearr5)rr>s rrWzOrderedDict.clearsC{ $$ DI  4rTc|std|j}|r|j}|j}||_||_n|j}|j}||_||_|j}|j|=t ||}||fS)zRemove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order if last is true or FIFO order if false. zdictionary is empty)KeyErrorr9r/r0r)r:r5rK)rrHr>rGrMrNr)rDs rpopitemzOrderedDict.popitems  2011 1{  "9D I!IN!DII9D I!DI!INh JsOs##Ezrc|j|}|j}|j}|j}||_||_|j}|r%|j}||_||_||_||_dS|j}||_||_||_||_dS)zMove an existing element to the end (or beginning if last is false). Raise KeyError if the element does not exist. N)r:r/r0r9) rr)rHrGrMrN soft_linkr>firsts r move_to_endzOrderedDict.move_to_ends z#I I N " " {  9DDIDI!DIDIIIIEDIDI"EJDIIIrctj}t|dz}||j}|||jdzz }|||j|zz }|||j|zz }|S)N)_sys getsizeoflen__dict__r:r7r9)rsizeofnsizes r __sizeof__zOrderedDict.__sizeof__s IIMvdm$$ tz""Q&& t''!++ t{##a'' rc t|S)z:D.keys() -> a set-like object providing a view on D's keys)rrs rkeyszOrderedDict.keyss#D)))rc t|S)z a set-like object providing a view on D's items)r&rs ritemszOrderedDict.itemss$T***rc t|S)z6D.values() -> an object providing a view on D's values)r+rs rvalueszOrderedDict.valuess%d+++rc|j}t|||}||urF|j|}|j}|j}||_||_d|_d|_|S||urt ||S)zod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. N)_OrderedDict__markerr5rKr:r/r0rY)rr)defaultmarkerresultrGrMrNs rrKzOrderedDict.pops $V,,   :>>#&&D I I&IN&INDIDIM f  3-- rNc(||vr||S|||<|S)zInsert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. r$rr)rrs r setdefaultzOrderedDict.setdefaults% $;;9 S rc|s|jjdS|jjdt|dS)zod.__repr__() <==> repr(od)()()) __class__r!listrmrs r__repr__zOrderedDict.__repr__ sL 7!^4446 6>222D4F4F4F4FGGrc|}|rt|tr|\}}ni}|}|}t t D].}||d||d/|r||f}n|pd}|jd|dt| fS)z%Return state information for picklingNr$) __getstate__ isinstancetuplecopyvarsrrKr|iterrm)rstateslotsks r __reduce__zOrderedDict.__reduce__s!!##  &%'' $ uuJJLLEJJLLE+--(( # # !T""" !T"""" &u  ~r5$TZZ\\0B0BBBrc,||S)z!od.copy() -> a shallow copy of odr|rs rrzOrderedDict.copy%~~d###rc.|}|D]}|||<|S)zYCreate a new ordered dictionary with keys from iterable and values set to value. r$)r;iterablerDrr)s rfromkeyszOrderedDict.fromkeys)s.suu  CDII rct|tr>t||o"t t t ||St||S)zod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. )rrr5__eq__allmap_eqrrAs rrzOrderedDict.__eq__2sX e[ ) ) K;;tU++JCT54I4I0J0J J{{4'''rc0|||Sr)updaters r__ior__zOrderedDict.__ior__;s E rct|tstS||}|||Srrr5NotImplementedr|rrrAnews r__or__zOrderedDict.__or__?sB%&& "! !nnT"" 5 rct|tstS||}|||Srrrs r__ror__zOrderedDict.__ror__FsB%&& "! !nnU## 4 r)r$)Tr)'r!r"r#__doc__r6rBr5rIr8r.rOrSrrWrZr^ri_collections_abcMutableMappingrr@rkrmro__ne__objectrqrKrw_recursive_reprr~rr classmethodrrrrrr$rrrrNs//%%%%"&!1e ' ' ' '-1,<    .2)7>>FX***+++,,, , 3FvxxH',_HHH CCC&$$$[(((rr)r) _tuplegetterc>tt||S)N)doc)property _itemgetter)indexrs rr\sh{5/A/As&K&K&KrF)renamedefaultsmodulec  ttr(ddt t tt jt|}|r|t}tD]^\}}| r(t|s| ds||vrd||<| |_|gzD]n}t|turtd| st!d|t|rt!d|ot}D]V}| dr|st!d|||vrt!d|| |Wi}|t#|}t%|t%krtd t't)t t+t)t)|}t#t t jt%d } d kr| dz } d d dDzdzt"jt&t"t$t t*f\id|d} d| d| d} t1| | } d| _d|d | d| _||| _t8fd} d|d| j_fd}d|d|_fd}fd}fd}| | j||||fD]}|d |j|_|d | dd!|| | ||||d" }tD]/\}}t jd#|}t?||||<0t|t"f|}|F t j d j!"d$d%}n#tFt f$rYnwxYw|||_$|S)&aCReturns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) , _z*Type names and field names must be stringsz6Type names and field names must be valid identifiers: z0Type names and field names cannot be a keyword: z-Field names cannot start with an underscore: z"Encountered duplicate field name: Nz(Got more default values than field names, r`rzc3 K|] }|dV dS)z=%rNr$).0names r znamedtuple..s(DD$|||DDDDDDrr{ namedtuple_) _tuple_new __builtins__r!z lambda _cls, z: _tuple_new(_cls, (z))r6zCreate new instance of c||}|kr"tddt||S)Nz Expected z arguments, got ) TypeErrorrd)r;rrt_len num_fields tuple_news r_makeznamedtuple.._makesQ3)) 4<<: % %Q QQCKKQQRR R rz Make a new z# object from a sequence or iterablec||j|}|rtdt||S)NzGot unexpected field names: )rrK ValueErrorr})rr=rt_map field_namess r_replaceznamedtuple.._replacesODD;==>>  LJDJJJJKK K rz Return a new z2 object replacing specified fields with new valuesc(|jj|zzS)z/Return a nicely formatted representation string)r|r!)rrepr_fmts rr~znamedtuple..__repr__s~&D88rc8|j|S)z9Return a new dict which maps field names to their values.)_fields)r_dict_zips r_asdictznamedtuple.._asdicts!uTT$,--...rc|S)z7Return self as a plain tuple. Used by copy and pickle.r$)r_tuples r__getnewargs__z"namedtuple..__getnewargs__svd||r.r$) rr2r_field_defaultsr6rrr~rr__match_args__zAlias for field number r!__main__)%rstrreplacesplitr}rrbinternset enumerate isidentifier _iskeyword startswithaddtyperrrrdr5rzipjoinr6evalr!r __defaults__r__func__r#r _getframe f_globalsgetAttributeErrorr")typenamerrrrseenrrfield_defaultsarg_list namespacecoder6rrr~rrmethodclass_namespacerrtrrrrrrrrs ` @@@@@@@@rr r ^s4+s##<!))#s3399;; s3 ,,--K{3x==))H uu$[11  KE4%%'' 1d## 1??3'' 14<<%0[[ E" HHTNNNN [(33 ::S HII I  "" 76-16677 7 d   32)-2233 3 3 55D ??3   * *) $))** * 4<<J$JJKK K N?? x==3{++ + +FGG GhtC0E0E080B0B-D-D(E(EFFGGDK5566K[!!Jyy%%HQCTYYDD DDDDDDsJH I&*E3S&@#E64t  ,(,,I F8 E E E E ED4##G GFFF8FFFGO'[ ,H,,,EN 1111H99999//////   >>"*==FO== ,,,,,)(%  O!--99 tk;E;;<< ,UC 8 8 (UHo 6 6F~ ^A&&044ZLLFF +    D  " Ms7-Q%%Q98Q9cB|j}|D]}||ddz||<dS)z!Tally elements from the iterable.r r`N)r)mappingr mapping_getelems r_count_elementsr s>+K11# D!,,q0 11r)rceZdZdZd fd ZdZdZd dZdZe d dZ d fd Z d d Z d Z d Zfd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!xZ"S)!raDict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values. >>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] Nc dt|j|fi|dS)a Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args N)superrBr)rrr=r|s rrBzCounter.__init__Ks;  H%%%%%%%rcdS)z1The count of elements not in the Counter is zero.r r$r(s r __missing__zCounter.__missing__Ys qrcDt|S)zSum of the counts)sumrors rtotalz Counter.total^s4;;==!!!rc|1t|tddSddl}|||tdS)zList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abracadabra').most_common(3) [('a', 5), ('b', 2), ('r', 2)] Nr`T)r)reverser )r))sortedrmrheapqnlargest)rrgrs r most_commonzCounter.most_commonbs] 9$**,,KNNDIII I  ~~a;q>>~BBBrcttjtt|S)aIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> import math >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> math.prod(prime_factors.elements()) 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. )_chain from_iterable_starmap_repeatrmrs relementszCounter.elementsrs'$#HWdjjll$C$CDDDrc td)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)r;rvs rrzCounter.fromkeyss" NPP Prc B|t|tjrX|r4|j}|D]\}}|||dz||<n2t |nt|||r||dSdS)aLike dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 Nr )rrMappingrrmrrr)rrr=self_getrcountr|s rrzCounter.updates(  ($4$<== 0-#xH'/~~'7'7?? e%*XXdA->->%>T ?GGNN8,,,,h///   KK       rc |e|j}t|tjr-|D]\}}||d|z ||<n|D]}||ddz ||<|r||dSdS)aLike dict.update() but subtracts counts instead of replacing them. Counts can be reduced below zero. Both the inputs and outputs are allowed to contain zero and negative counts. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 Nr r`)rrrrrmsubtract)rrr=rrrs rrzCounter.subtracts  xH($4$<== 7#+>>#3#3;;KD%!)$!2!2U!:DJJ;%77D!)$!2!2Q!6DJJ  MM$       rc,||S)zReturn a shallow copy.rrs rrz Counter.copyrrc0|jt|ffSr)r|r5rs rrzCounter.__reduce__s~T },,rcV||vr#t|dSdS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)rrO)rrr|s rrOzCounter.__delitem__s1 4<< GG   % % % % % .=II1qII!47eAh&IIIIIIIrrrrrrs``rrzCounter.__eq__ F%)) "! !IIIIIu IIIIIIrcHt|tstS||k S)z@True if any counts disagree. Missing counts are treated as zero.rrrrs rrzCounter.__ne__s'%)) "! !5=  rczttstStfdfDS)z:True if all counts in self are a subset of those in other.c3FK|]}|D]}||kVdSrr$rs rrz!Counter.__le__..rrr rs``r__le__zCounter.__le__r!rcRt|tstS||ko||kS)zATrue if all counts in self are a proper subset of those in other.r#rs r__lt__zCounter.__lt__-%)) "! !u}..rczttstStfdfDS)z.&rrr rs``r__ge__zCounter.__ge__"r!rcRt|tstS||ko||kS)zCTrue if all counts in self are a proper superset of those in other.r#rs r__gt__zCounter.__gt__(r)rc t|tstSt}|D]\}}|||z}|dkr|||<|D]\}}||vr |dkr|||<|S)zAdd counts from two counters. >>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) r rrrrmrrArtrrnewcounts r__add__zCounter.__add__.s%)) "! !::<< ( (KD%uT{*H!||'t  ;;== % %KD%4EAII$t  rct|tstSt}|D]\}}|||z }|dkr|||<|D]\}}||vr|dkrd|z ||<|S)z Subtract count, but keep only results with positive counts. >>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) r r0r1s r__sub__zCounter.__sub__As%)) "! !::<< ( (KD%uT{*H!||'t  ;;== ) )KD%4EAII 5yt  rct|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|D]\}}||vr |dkr|||<|S)zUnion is the maximum of value in either of the input counters. >>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) r r0rrArtrr other_countr2s rrzCounter.__or__Ts%)) "! !::<< ( (KD%+K&+k&9&9{{uH!||'t  ;;== % %KD%4EAII$t  rct|tstSt}|D]"\}}||}||kr|n|}|dkr|||<#|S)z Intersection is the minimum of corresponding counts. >>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) r r0r7s r__and__zCounter.__and__hst%)) "! !::<< ( (KD%+K % 3 3uuH!||'t  rclt}|D]\}}|dkr|||<|S)zEAdds an empty counter, effectively stripping negative and zero countsr rrmrrtrrs r__pos__zCounter.__pos__ys>::<< % %KD%qyy$t  rcrt}|D]\}}|dkrd|z ||<|S)z{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. r r<r=s r__neg__zCounter.__neg__sD ::<< ) )KD%qyy 5yt  rcRd|D}|D]}||=|S)z?Internal method to strip elements with a negative or zero countc$g|] \}}|dk |S)r r$)rrrs r z*Counter._keep_positive..s!MMM e5199t999r)rm)r nonpositivers r_keep_positivezCounter._keep_positives:MMtzz||MMM   DT  rc~|D]\}}||xx|z cc<|S)zInplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) rmrErrArrs r__iadd__zCounter.__iadd__I!;;==  KD% JJJ% JJJJ""$$$rc~|D]\}}||xx|zcc<|S)zInplace subtract counter, but keep only results with positive counts. >>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) rGrHs r__isub__zCounter.__isub__rJrc|D]\}}||}||kr|||<|S)zInplace union is the maximum of value from either counter. >>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) rG)rrArr8rs rrzCounter.__ior__sP"' ) ) D+JEU""(T ""$$$rc|D]\}}||}||kr|||<|S)zInplace intersection is the minimum of corresponding counts. >>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) rG)rrArrr8s r__iand__zCounter.__iand__sO ::<< ) )KD%+KU""(T ""$$$rr)#r!r"r#rrBrrrr rrrrrrrOr~rrr&r(r,r.r3r5rr:r>r@rErIrLrrO __classcell__rs@rrrs6**d & & & & & & """CCCC EEE, P P P[ P      D    6$$$---&&&&& 3 3 3ZJJJ !!! JJJ /// JJJ /// &&("    % % % % % % % % % % % % % % % %rrceZdZdZdZdZdZddZdZdZ d Z d Z e d Z ed Zd ZeZddZedZdZdZdZdZdZdZdZdZdS)ra A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can be accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. c4t|pig|_dS)zInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N)r}maps)rrSs rrBzChainMap.__init__s JJ&2$ rc t|r)rYr(s rrzChainMap.__missing__ssmmrct|jD]} ||cS#t$rYwxYw||Sr)rSrYr)rr)rs r __getitem__zChainMap.__getitem__s\y  G s|###    $$$s  ""Nc||vr||n|Srr$rvs rrz ChainMap.gets4KKtCyyW4rcRttj|jSr)rdrunionrSrs r__len__zChainMap.__len__s;355; *+++rci}t|jD]/}|t|0t |Sr)rrSrr5rr)rrrs rrSzChainMap.__iter__sL  ** - -G HHT]]7++ , , , ,AwwrcDtfd|jDS)Nc3 K|]}|vV dSrr$)rmr)s rrz(ChainMap.__contains__..s'//3!8//////ranyrSr(s `r __contains__zChainMap.__contains__s(////TY//////rc*t|jSrr_rs r__bool__zChainMap.__bool__49~~rc||jjddtt|jdS)Nrzrr{)r|r!rrreprrSrs rr~zChainMap.__repr__s6.)NNDIIc$ 6J6J,K,KNNNNrc8|tj|g|RS)z?Create a ChainMap with a single dict created from the iterable.)r5r)r;rr<s rrzChainMap.fromkeyss&s4=1D111222rcr|j|jdg|jddRS)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r r`N)r|rSrrs rrz ChainMap.copy s8t~dil//11BDIabbMBBBBrc `||}n|r|||j|g|jRS)zNew ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. Keyword arguments update the map or new empty dict. )rr|rS)rr^kwargss r new_childzChainMap.new_childsF 9AA   HHV   t~a,$),,,,rc0|j|jddS)zNew ChainMap from maps[1:].r`N)r|rSrs rparentszChainMap.parentsst~ty}--rc&||jd|<dSNr )rS)rr)rDs rrIzChainMap.__setitem__!s! ! Srcd |jd|=dS#t$rtd|wxYw)Nr $Key not found in the first mapping: )rSrYr(s rrOzChainMap.__delitem__$sR K ! S!!! K K KI#IIJJ J Ks/c| |jdS#t$rtdwxYw)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r z#No keys found in the first mapping.)rSrZrYrs rrZzChainMap.popitem*sN B9Q<'')) ) B B B@AA A Bs!;cv |jdj|g|RS#t$rtd|wxYw)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r rq)rSrKrY)rr)r<s rrKz ChainMap.pop1s_ K#49Q<#C/$/// / K K KI#IIJJ J Ks8cD|jddS)z'Clear maps[0], leaving maps[1:] intact.r N)rSrWrs rrWzChainMap.clear8s  ! rcF|jd||Sro)rSrrs rrzChainMap.__ior__<s! ! E""" rct|tjstS|}|jd||Sro)rrrrrrSr)rrAr^s rrzChainMap.__or__@sJ%!1!9:: "! ! IIKK q rct|tjstSt |}t |jD]}||||Sr) rrrrr5rrSrr|)rrAr^childs rrzChainMap.__ror__Gse%!1!9:: "! ! KKdi((  E HHUOOOO~~a   rr)r!r"r#rrBrrVrrZrSrarcrr~rrr__copy__rkrrmrIrOrZrKrWrrrr$rrrrs  '''%%%5555,,, 000_OOO33[3CCCH - - - -..X."""KKK BBBKKK!!!!!rrcveZdZddZdZdZdZdZdZdZ d Z d Z d Z d Z d ZdZeddZdS)rNc ti|_||||r||dSdSr)datar)rr5rjs rrBzUserDict.__init__WsK   KK     KK       rc*t|jSrrdr|rs rrZzUserDict.__len__^rdrc||jvr |j|St|jdr|j||St |)Nr)r|hasattrr|rrYr(s rrVzUserDict.__getitem__asS $)  9S> ! 4>= 1 1 9>--dC88 8smmrc||j|<dSrr|)rr)items rrIzUserDict.__setitem__hs #rc|j|=dSrrr(s rrOzUserDict.__delitem__ks IcNNNrc*t|jSr)rr|rs rrSzUserDict.__iter__nDIrc||jvSrrr(s rrazUserDict.__contains__rsdirc*t|jSrrfr|rs rr~zUserDict.__repr__vrrct|tr"||j|jzSt|tr||j|zSt Srrrr|r|r5rrs rrzUserDict.__or__ys` eX & & :>>$)ej"899 9 eT " " 5>>$)e"344 4rct|tr"||j|jzSt|tr|||jzSt Srrrs rrzUserDict.__ror__s` eX & & :>>%*ty"899 9 eT " " 5>>%$)"344 4rc|t|tr|xj|jzc_n|xj|zc_|Sr)rrr|rs rrzUserDict.__ior__s= eX & &  II #III II II rc|j|j}|j|j|jd|jd<|SNr|)r|r6rerrrinsts rryzUserDict.__copy__sU~%%dn55 T]+++ $ f 5 : : < < f rc|jtur&t|jSddl}|j} i|_||}||_n #||_wxYw|||Sro)r|rr|rr)rrr|rs rrz UserDict.copys >X % %DINN,,-- - y DI $ADIIDI     s A%% A.c.|}|D]}|||<|Srr$)r;rrDrr)s rrzUserDict.fromkeyss, CEE  CAcFFrr)r!r"r#rBrZrVrIrOrSrar~rrrryrrrr$rrrrTs          [rrceZdZdZd"dZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZeZdZdZdZdZd#dZdZdZdZdZdZdZ d Z!d!Z"dS)$rzAA more or less complete user-defined wrapper around list objects.Nc g|_|yt|t|jkr||jdd<dSt|tr|jdd|jdd<dSt ||_dSdSr)r|rrrr})rinitlists rrBzUserList.__init__s  H~~di00' !!! Hh// +'}QQQ/ !!!  NN  rc*t|jSrrrs rr~zUserList.__repr__rrc>|j||kSrr|_UserList__castrs rr(zUserList.__lt__y4;;u----rc>|j||kSrrrs rr&zUserList.__le__yDKK....rc>|j||kSrrrs rrzUserList.__eq__rrc>|j||kSrrrs rr.zUserList.__gt__rrc>|j||kSrrrs rr,zUserList.__ge__rrc>t|tr|jn|Sr)rrr|rs r__castzUserList.__casts'x88CuzzeCrc||jvSrrrrs rrazUserList.__contains__sty  rc*t|jSrr~rs rrZzUserList.__len__rdrct|tr ||j|S|j|Sr)rslicer|r|ris rrVzUserList.__getitem__s8 a   >>$)A,// /9Q< rc||j|<dSrrrrrs rrIzUserList.__setitem__s ! rc|j|=dSrrrs rrOzUserList.__delitem__s IaLLLrcBt|tr"||j|jzSt|t |jr||j|zS||jt |zSrrrr|r|rr}rs rr3zUserList.__add__s eX & & 5>>$)ej"899 9 tDI / / 5>>$)e"344 4~~di$u++5666rcBt|tr"||j|jzSt|t |jr|||jzS|t ||jzSrrrs r__radd__zUserList.__radd__s eX & & 5>>%*ty"899 9 tDI / / 5>>%$)"344 4~~d5kkDI5666rct|tr|xj|jz c_nPt|t|jr|xj|z c_n|xjt |z c_|Sr)rrr|rr}rs rrIzUserList.__iadd__so eX & & % II #III tDI / / % II III IIe $II rc<||j|zSrr|r|rrgs r__mul__zUserList.__mul__~~di!m,,,rc&|xj|zc_|Srrrs r__imul__zUserList.__imul__s Q  rc|j|j}|j|j|jddd|jd<|Sr)r|r6rerrs rryzUserList.__copy__sR~%%dn55 T]+++ $ f 5aaa 8 f rc:|j|dSr)r|appendrs rrzUserList.append  rc<|j||dSr)r|insertrs rrzUserList.insert s  D!!!!!rc6|j|Sr)r|rKrs rrKz UserList.popsy}}Qrc:|j|dSr)r|removers rrzUserList.removerrc8|jdSr)r|rWrs rrWzUserList.clears rc,||Srrrs rrz UserList.copys~~d###rc6|j|Sr)r|rrs rrzUserList.countsyt$$$rc(|jj|g|RSrr|r)rrr<s rrzUserList.indexstyt+d++++rc8|jdSr)r|rrs rrzUserList.reverse"s rc*|jj|i|dSr)r|sortrr<r=s rrz UserList.sort%s! %%%%%%rct|tr!|j|jdS|j|dSr)rrr|extendrs rrzUserList.extend(sN eX & & $ I  UZ ( ( ( ( ( I  U # # # # #rrr)#r!r"r#rrBr~r(r&rr.r,rrarZrVrIrOr3rrIr__rmul__rryrrrKrrWrrrrrrr$rrrrsKK + + + +...//////...///DDD!!!   777777---H"""    $$$%%%,,,&&&$$$$$rrc4eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZeZdZdZdZdZdZdejfdZdZdZ dKdZ!dejfd Z"dLd"Z#dejfd#Z$d$Z%d%Z&dejfd&Z'd'Z(d(Z)d)Z*d*Z+d+Z,d,Z-d-Z.d.Z/d/Z0d0Z1d1Z2d2Z3d3Z4d4Z5d5Z6dMd7Z7e8j9Z9d8Z:dNd:Z;dejfd;Zd>Z?dMd?Z@dOd@ZAdOdAZBdPdCZCdejfdDZDdMdEZEdFZFdGZGdHZHdIZIdJZJd6S)Qrct|tr ||_dSt|tr|jdd|_dSt||_dSr)rrr|rrseqs rrBzUserString.__init__5sW c3   !DIII Z ( ( ! DIIICDIIIrc*t|jSr)rr|rs r__str__zUserString.__str__=rdrc*t|jSrrrs rr~zUserString.__repr__@rrc*t|jSr)intr|rs r__int__zUserString.__int__Crdrc*t|jSr)floatr|rs r __float__zUserString.__float__FsTYrc*t|jSr)complexr|rs r __complex__zUserString.__complex__Isty!!!rc*t|jSr)hashr|rs r__hash__zUserString.__hash__Lrrc"|jddfSrrrs rrzUserString.__getnewargs__Os !!! rcbt|tr|j|jkS|j|kSrrrr|rstrings rrzUserString.__eq__R0 fj ) ) ,9 + +yF""rcbt|tr|j|jkS|j|kSrrrs rr(zUserString.__lt__W0 fj ) ) +9v{* *y6!!rcbt|tr|j|jkS|j|kSrrrs rr&zUserString.__le__\rrcbt|tr|j|jkS|j|kSrrrs rr.zUserString.__gt__arrcbt|tr|j|jkS|j|kSrrrs rr,zUserString.__ge__frrcLt|tr|j}||jvSrr)rchars rrazUserString.__contains__ks( dJ ' ' 9Dty  rc*t|jSrr~rs rrZzUserString.__len__prdrcB||j|Srr)rrs rrVzUserString.__getitem__ss~~di.///rc(t|tr"||j|jzSt|tr||j|zS||jt |zSr)rrr|r|rrs rr3zUserString.__add__vsy eZ ( ( 5>>$)ej"899 9 s # # 5>>$)e"344 4~~di#e**4555rct|tr|||jzS|t||jzSr)rrr|r|rs rrzUserString.__radd__}sL eS ! ! 5>>%$)"344 4~~c%jj494555rc<||j|zSrrrs rrzUserString.__mul__rrc<||j|zSrrrr<s r__mod__zUserString.__mod__s~~di$.///rcL|t||zSr)r|r)rtemplates r__rmod__zUserString.__rmod__s~~c(mmd2333rcZ||jSr)r|r| capitalizers rrzUserString.capitalizes"~~di2244555rcZ||jSr)r|r|casefoldrs rrzUserString.casefold"~~di0022333rcN||jj|g|RSr)r|r|centerrwidthr<s rrzUserString.centers,~~.di.u>> !dl0000 >>> >>> 2222 &'DL6666==== T\//// ///--- !dl0000#########%%%###(((###%%%'''############===1117777 I(((EEEE !dl0000 !"t|1111===)))7777....////....()dl88886666444111:::11166666rr)4r__all__rsysrb itertoolsr rr r rr keywordrroperatorrrrrreprlibrr_weakrefrr8 _collectionsr MutableSequenceregister ImportErrorrKeysViewr ItemsViewr& ValuesViewr+rr.r5rrr rrrrrrSequencerr$rrrsK   %%%%%%''''''))))))++++++......555555$$$$$$5""""""$--e4444   D  (((((((   D ++++++4+++ ,,,,,,6,,, %%%%%-8%%% 55555F555}}}}}$}}}@ (((((((   D L)))))))LLLKKLLLL16Thhhhh^111  ,,,,,,,   D q%q%q%q%q%dq%q%q%p }!}!}!}!}!.}!}!}!HSSSSS.SSSt~$~$~$~$~$/~$~$~$Ju6u6u6u6u6!*u6u6u6u6u6sZA!!A)(A)-A44A<;A<CC$#C$(C//C:9C: DDDPK!<<%__pycache__/abc.cpython-311.opt-2.pycnu[ !A?hw&ddlTddlmZddlmZdS))*)__all__)_CallableGenericAliasN)_collections_abcrrr s;$$$$$$22222222rPK!"% ~22 __init__.pynu['''This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * ChainMap dict-like class for creating a single view of multiple mappings * Counter dict subclass for counting hashable objects * OrderedDict dict subclass that remembers the order entries were added * defaultdict dict subclass that calls a factory function to supply missing values * UserDict wrapper around dictionary objects for easier dict subclassing * UserList wrapper around list objects for easier list subclassing * UserString wrapper around string objects for easier string subclassing ''' __all__ = [ 'ChainMap', 'Counter', 'OrderedDict', 'UserDict', 'UserList', 'UserString', 'defaultdict', 'deque', 'namedtuple', ] import _collections_abc import sys as _sys from itertools import chain as _chain from itertools import repeat as _repeat from itertools import starmap as _starmap from keyword import iskeyword as _iskeyword from operator import eq as _eq from operator import itemgetter as _itemgetter from reprlib import recursive_repr as _recursive_repr from _weakref import proxy as _proxy try: from _collections import deque except ImportError: pass else: _collections_abc.MutableSequence.register(deque) try: from _collections import defaultdict except ImportError: pass ################################################################################ ### OrderedDict ################################################################################ class _OrderedDictKeysView(_collections_abc.KeysView): def __reversed__(self): yield from reversed(self._mapping) class _OrderedDictItemsView(_collections_abc.ItemsView): def __reversed__(self): for key in reversed(self._mapping): yield (key, self._mapping[key]) class _OrderedDictValuesView(_collections_abc.ValuesView): def __reversed__(self): for key in reversed(self._mapping): yield self._mapping[key] class _Link(object): __slots__ = 'prev', 'next', 'key', '__weakref__' class OrderedDict(dict): 'Dictionary that remembers insertion order' # An inherited dict maps keys to values. # The inherited dict provides __getitem__, __len__, __contains__, and get. # The remaining methods are order-aware. # Big-O running times for all methods are the same as regular dictionaries. # The internal self.__map dict maps keys to links in a doubly linked list. # The circular doubly linked list starts and ends with a sentinel element. # The sentinel element never gets deleted (this simplifies the algorithm). # The sentinel is in self.__hardroot with a weakref proxy in self.__root. # The prev links are weakref proxies (to prevent circular references). # Individual links are kept alive by the hard reference in self.__map. # Those hard references disappear when a key is deleted from an OrderedDict. def __new__(cls, /, *args, **kwds): "Create the ordered dict object and set up the underlying structures." self = dict.__new__(cls) self.__hardroot = _Link() self.__root = root = _proxy(self.__hardroot) root.prev = root.next = root self.__map = {} return self def __init__(self, other=(), /, **kwds): '''Initialize an ordered dictionary. The signature is the same as regular dictionaries. Keyword argument order is preserved. ''' self.__update(other, **kwds) def __setitem__(self, key, value, dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link): 'od.__setitem__(i, y) <==> od[i]=y' # Setting a new item creates a new link at the end of the linked list, # and the inherited dictionary is updated with the new key/value pair. if key not in self: self.__map[key] = link = Link() root = self.__root last = root.prev link.prev, link.next, link.key = last, root, key last.next = link root.prev = proxy(link) dict_setitem(self, key, value) def __delitem__(self, key, dict_delitem=dict.__delitem__): 'od.__delitem__(y) <==> del od[y]' # Deleting an existing item uses self.__map to find the link which gets # removed by updating the links in the predecessor and successor nodes. dict_delitem(self, key) link = self.__map.pop(key) link_prev = link.prev link_next = link.next link_prev.next = link_next link_next.prev = link_prev link.prev = None link.next = None def __iter__(self): 'od.__iter__() <==> iter(od)' # Traverse the linked list in order. root = self.__root curr = root.next while curr is not root: yield curr.key curr = curr.next def __reversed__(self): 'od.__reversed__() <==> reversed(od)' # Traverse the linked list in reverse order. root = self.__root curr = root.prev while curr is not root: yield curr.key curr = curr.prev def clear(self): 'od.clear() -> None. Remove all items from od.' root = self.__root root.prev = root.next = root self.__map.clear() dict.clear(self) def popitem(self, last=True): '''Remove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order if last is true or FIFO order if false. ''' if not self: raise KeyError('dictionary is empty') root = self.__root if last: link = root.prev link_prev = link.prev link_prev.next = root root.prev = link_prev else: link = root.next link_next = link.next root.next = link_next link_next.prev = root key = link.key del self.__map[key] value = dict.pop(self, key) return key, value def move_to_end(self, key, last=True): '''Move an existing element to the end (or beginning if last is false). Raise KeyError if the element does not exist. ''' link = self.__map[key] link_prev = link.prev link_next = link.next soft_link = link_next.prev link_prev.next = link_next link_next.prev = link_prev root = self.__root if last: last = root.prev link.prev = last link.next = root root.prev = soft_link last.next = link else: first = root.next link.prev = root link.next = first first.prev = soft_link root.next = link def __sizeof__(self): sizeof = _sys.getsizeof n = len(self) + 1 # number of links including root size = sizeof(self.__dict__) # instance dictionary size += sizeof(self.__map) * 2 # internal dict and inherited dict size += sizeof(self.__hardroot) * n # link objects size += sizeof(self.__root) * n # proxy objects return size update = __update = _collections_abc.MutableMapping.update def keys(self): "D.keys() -> a set-like object providing a view on D's keys" return _OrderedDictKeysView(self) def items(self): "D.items() -> a set-like object providing a view on D's items" return _OrderedDictItemsView(self) def values(self): "D.values() -> an object providing a view on D's values" return _OrderedDictValuesView(self) __ne__ = _collections_abc.MutableMapping.__ne__ __marker = object() def pop(self, key, default=__marker): '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. ''' marker = self.__marker result = dict.pop(self, key, marker) if result is not marker: # The same as in __delitem__(). link = self.__map.pop(key) link_prev = link.prev link_next = link.next link_prev.next = link_next link_next.prev = link_prev link.prev = None link.next = None return result if default is marker: raise KeyError(key) return default def setdefault(self, key, default=None): '''Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. ''' if key in self: return self[key] self[key] = default return default @_recursive_repr() def __repr__(self): 'od.__repr__() <==> repr(od)' if not self: return '%s()' % (self.__class__.__name__,) return '%s(%r)' % (self.__class__.__name__, list(self.items())) def __reduce__(self): 'Return state information for pickling' state = self.__getstate__() if state: if isinstance(state, tuple): state, slots = state else: slots = {} state = state.copy() slots = slots.copy() for k in vars(OrderedDict()): state.pop(k, None) slots.pop(k, None) if slots: state = state, slots else: state = state or None return self.__class__, (), state, None, iter(self.items()) def copy(self): 'od.copy() -> a shallow copy of od' return self.__class__(self) @classmethod def fromkeys(cls, iterable, value=None): '''Create a new ordered dictionary with keys from iterable and values set to value. ''' self = cls() for key in iterable: self[key] = value return self def __eq__(self, other): '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. ''' if isinstance(other, OrderedDict): return dict.__eq__(self, other) and all(map(_eq, self, other)) return dict.__eq__(self, other) def __ior__(self, other): self.update(other) return self def __or__(self, other): if not isinstance(other, dict): return NotImplemented new = self.__class__(self) new.update(other) return new def __ror__(self, other): if not isinstance(other, dict): return NotImplemented new = self.__class__(other) new.update(self) return new try: from _collections import OrderedDict except ImportError: # Leave the pure Python version in place. pass ################################################################################ ### namedtuple ################################################################################ try: from _collections import _tuplegetter except ImportError: _tuplegetter = lambda index, doc: property(_itemgetter(index), doc=doc) def namedtuple(typename, field_names, *, rename=False, defaults=None, module=None): """Returns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) """ # Validate the field names. At the user's option, either generate an error # message or automatically replace the field name with a valid name. if isinstance(field_names, str): field_names = field_names.replace(',', ' ').split() field_names = list(map(str, field_names)) typename = _sys.intern(str(typename)) if rename: seen = set() for index, name in enumerate(field_names): if (not name.isidentifier() or _iskeyword(name) or name.startswith('_') or name in seen): field_names[index] = f'_{index}' seen.add(name) for name in [typename] + field_names: if type(name) is not str: raise TypeError('Type names and field names must be strings') if not name.isidentifier(): raise ValueError('Type names and field names must be valid ' f'identifiers: {name!r}') if _iskeyword(name): raise ValueError('Type names and field names cannot be a ' f'keyword: {name!r}') seen = set() for name in field_names: if name.startswith('_') and not rename: raise ValueError('Field names cannot start with an underscore: ' f'{name!r}') if name in seen: raise ValueError(f'Encountered duplicate field name: {name!r}') seen.add(name) field_defaults = {} if defaults is not None: defaults = tuple(defaults) if len(defaults) > len(field_names): raise TypeError('Got more default values than field names') field_defaults = dict(reversed(list(zip(reversed(field_names), reversed(defaults))))) # Variables used in the methods and docstrings field_names = tuple(map(_sys.intern, field_names)) num_fields = len(field_names) arg_list = ', '.join(field_names) if num_fields == 1: arg_list += ',' repr_fmt = '(' + ', '.join(f'{name}=%r' for name in field_names) + ')' tuple_new = tuple.__new__ _dict, _tuple, _len, _map, _zip = dict, tuple, len, map, zip # Create all the named tuple methods to be added to the class namespace namespace = { '_tuple_new': tuple_new, '__builtins__': {}, '__name__': f'namedtuple_{typename}', } code = f'lambda _cls, {arg_list}: _tuple_new(_cls, ({arg_list}))' __new__ = eval(code, namespace) __new__.__name__ = '__new__' __new__.__doc__ = f'Create new instance of {typename}({arg_list})' if defaults is not None: __new__.__defaults__ = defaults @classmethod def _make(cls, iterable): result = tuple_new(cls, iterable) if _len(result) != num_fields: raise TypeError(f'Expected {num_fields} arguments, got {len(result)}') return result _make.__func__.__doc__ = (f'Make a new {typename} object from a sequence ' 'or iterable') def _replace(self, /, **kwds): result = self._make(_map(kwds.pop, field_names, self)) if kwds: raise ValueError(f'Got unexpected field names: {list(kwds)!r}') return result _replace.__doc__ = (f'Return a new {typename} object replacing specified ' 'fields with new values') def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + repr_fmt % self def _asdict(self): 'Return a new dict which maps field names to their values.' return _dict(_zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return _tuple(self) # Modify function metadata to help with introspection and debugging for method in ( __new__, _make.__func__, _replace, __repr__, _asdict, __getnewargs__, ): method.__qualname__ = f'{typename}.{method.__name__}' # Build-up the class namespace dictionary # and use type() to build the result class class_namespace = { '__doc__': f'{typename}({arg_list})', '__slots__': (), '_fields': field_names, '_field_defaults': field_defaults, '__new__': __new__, '_make': _make, '_replace': _replace, '__repr__': __repr__, '_asdict': _asdict, '__getnewargs__': __getnewargs__, '__match_args__': field_names, } for index, name in enumerate(field_names): doc = _sys.intern(f'Alias for field number {index}') class_namespace[name] = _tuplegetter(index, doc) result = type(typename, (tuple,), class_namespace) # For pickling to work, the __module__ variable needs to be set to the frame # where the named tuple is created. Bypass this step in environments where # sys._getframe is not defined (Jython for example) or sys._getframe is not # defined for arguments greater than 0 (IronPython), or where the user has # specified a particular module. if module is None: try: module = _sys._getframe(1).f_globals.get('__name__', '__main__') except (AttributeError, ValueError): pass if module is not None: result.__module__ = module return result ######################################################################## ### Counter ######################################################################## def _count_elements(mapping, iterable): 'Tally elements from the iterable.' mapping_get = mapping.get for elem in iterable: mapping[elem] = mapping_get(elem, 0) + 1 try: # Load C helper function if available from _collections import _count_elements except ImportError: pass class Counter(dict): '''Dict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values. >>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] ''' # References: # http://en.wikipedia.org/wiki/Multiset # http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html # http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm # http://code.activestate.com/recipes/259174/ # Knuth, TAOCP Vol. II section 4.6.3 def __init__(self, iterable=None, /, **kwds): '''Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args ''' super().__init__() self.update(iterable, **kwds) def __missing__(self, key): 'The count of elements not in the Counter is zero.' # Needed so that self[missing_item] does not raise KeyError return 0 def total(self): 'Sum of the counts' return sum(self.values()) def most_common(self, n=None): '''List the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abracadabra').most_common(3) [('a', 5), ('b', 2), ('r', 2)] ''' # Emulate Bag.sortedByCount from Smalltalk if n is None: return sorted(self.items(), key=_itemgetter(1), reverse=True) # Lazy import to speedup Python startup time import heapq return heapq.nlargest(n, self.items(), key=_itemgetter(1)) def elements(self): '''Iterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> import math >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> math.prod(prime_factors.elements()) 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. ''' # Emulate Bag.do from Smalltalk and Multiset.begin from C++. return _chain.from_iterable(_starmap(_repeat, self.items())) # Override dict methods where necessary @classmethod def fromkeys(cls, iterable, v=None): # There is no equivalent method for counters because the semantics # would be ambiguous in cases such as Counter.fromkeys('aaabbc', v=2). # Initializing counters to zero values isn't necessary because zero # is already the default value for counter lookups. Initializing # to one is easily accomplished with Counter(set(iterable)). For # more exotic cases, create a dictionary first using a dictionary # comprehension or dict.fromkeys(). raise NotImplementedError( 'Counter.fromkeys() is undefined. Use Counter(iterable) instead.') def update(self, iterable=None, /, **kwds): '''Like dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 ''' # The regular dict.update() operation makes no sense here because the # replace behavior results in some of the original untouched counts # being mixed-in with all of the other counts for a mismash that # doesn't have a straight-forward interpretation in most counting # contexts. Instead, we implement straight-addition. Both the inputs # and outputs are allowed to contain zero and negative counts. if iterable is not None: if isinstance(iterable, _collections_abc.Mapping): if self: self_get = self.get for elem, count in iterable.items(): self[elem] = count + self_get(elem, 0) else: # fast path when counter is empty super().update(iterable) else: _count_elements(self, iterable) if kwds: self.update(kwds) def subtract(self, iterable=None, /, **kwds): '''Like dict.update() but subtracts counts instead of replacing them. Counts can be reduced below zero. Both the inputs and outputs are allowed to contain zero and negative counts. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 ''' if iterable is not None: self_get = self.get if isinstance(iterable, _collections_abc.Mapping): for elem, count in iterable.items(): self[elem] = self_get(elem, 0) - count else: for elem in iterable: self[elem] = self_get(elem, 0) - 1 if kwds: self.subtract(kwds) def copy(self): 'Return a shallow copy.' return self.__class__(self) def __reduce__(self): return self.__class__, (dict(self),) def __delitem__(self, elem): 'Like dict.__delitem__() but does not raise KeyError for missing values.' if elem in self: super().__delitem__(elem) def __repr__(self): if not self: return f'{self.__class__.__name__}()' try: # dict() preserves the ordering returned by most_common() d = dict(self.most_common()) except TypeError: # handle case where values are not orderable d = dict(self) return f'{self.__class__.__name__}({d!r})' # Multiset-style mathematical operations discussed in: # Knuth TAOCP Volume II section 4.6.3 exercise 19 # and at http://en.wikipedia.org/wiki/Multiset # # Outputs guaranteed to only include positive counts. # # To strip negative and zero counts, add-in an empty counter: # c += Counter() # # Results are ordered according to when an element is first # encountered in the left operand and then by the order # encountered in the right operand. # # When the multiplicities are all zero or one, multiset operations # are guaranteed to be equivalent to the corresponding operations # for regular sets. # Given counter multisets such as: # cp = Counter(a=1, b=0, c=1) # cq = Counter(c=1, d=0, e=1) # The corresponding regular sets would be: # sp = {'a', 'c'} # sq = {'c', 'e'} # All of the following relations would hold: # set(cp + cq) == sp | sq # set(cp - cq) == sp - sq # set(cp | cq) == sp | sq # set(cp & cq) == sp & sq # (cp == cq) == (sp == sq) # (cp != cq) == (sp != sq) # (cp <= cq) == (sp <= sq) # (cp < cq) == (sp < sq) # (cp >= cq) == (sp >= sq) # (cp > cq) == (sp > sq) def __eq__(self, other): 'True if all counts agree. Missing counts are treated as zero.' if not isinstance(other, Counter): return NotImplemented return all(self[e] == other[e] for c in (self, other) for e in c) def __ne__(self, other): 'True if any counts disagree. Missing counts are treated as zero.' if not isinstance(other, Counter): return NotImplemented return not self == other def __le__(self, other): 'True if all counts in self are a subset of those in other.' if not isinstance(other, Counter): return NotImplemented return all(self[e] <= other[e] for c in (self, other) for e in c) def __lt__(self, other): 'True if all counts in self are a proper subset of those in other.' if not isinstance(other, Counter): return NotImplemented return self <= other and self != other def __ge__(self, other): 'True if all counts in self are a superset of those in other.' if not isinstance(other, Counter): return NotImplemented return all(self[e] >= other[e] for c in (self, other) for e in c) def __gt__(self, other): 'True if all counts in self are a proper superset of those in other.' if not isinstance(other, Counter): return NotImplemented return self >= other and self != other def __add__(self, other): '''Add counts from two counters. >>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) ''' if not isinstance(other, Counter): return NotImplemented result = Counter() for elem, count in self.items(): newcount = count + other[elem] if newcount > 0: result[elem] = newcount for elem, count in other.items(): if elem not in self and count > 0: result[elem] = count return result def __sub__(self, other): ''' Subtract count, but keep only results with positive counts. >>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) ''' if not isinstance(other, Counter): return NotImplemented result = Counter() for elem, count in self.items(): newcount = count - other[elem] if newcount > 0: result[elem] = newcount for elem, count in other.items(): if elem not in self and count < 0: result[elem] = 0 - count return result def __or__(self, other): '''Union is the maximum of value in either of the input counters. >>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) ''' if not isinstance(other, Counter): return NotImplemented result = Counter() for elem, count in self.items(): other_count = other[elem] newcount = other_count if count < other_count else count if newcount > 0: result[elem] = newcount for elem, count in other.items(): if elem not in self and count > 0: result[elem] = count return result def __and__(self, other): ''' Intersection is the minimum of corresponding counts. >>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) ''' if not isinstance(other, Counter): return NotImplemented result = Counter() for elem, count in self.items(): other_count = other[elem] newcount = count if count < other_count else other_count if newcount > 0: result[elem] = newcount return result def __pos__(self): 'Adds an empty counter, effectively stripping negative and zero counts' result = Counter() for elem, count in self.items(): if count > 0: result[elem] = count return result def __neg__(self): '''Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. ''' result = Counter() for elem, count in self.items(): if count < 0: result[elem] = 0 - count return result def _keep_positive(self): '''Internal method to strip elements with a negative or zero count''' nonpositive = [elem for elem, count in self.items() if not count > 0] for elem in nonpositive: del self[elem] return self def __iadd__(self, other): '''Inplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) ''' for elem, count in other.items(): self[elem] += count return self._keep_positive() def __isub__(self, other): '''Inplace subtract counter, but keep only results with positive counts. >>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) ''' for elem, count in other.items(): self[elem] -= count return self._keep_positive() def __ior__(self, other): '''Inplace union is the maximum of value from either counter. >>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) ''' for elem, other_count in other.items(): count = self[elem] if other_count > count: self[elem] = other_count return self._keep_positive() def __iand__(self, other): '''Inplace intersection is the minimum of corresponding counts. >>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) ''' for elem, count in self.items(): other_count = other[elem] if other_count < count: self[elem] = other_count return self._keep_positive() ######################################################################## ### ChainMap ######################################################################## class ChainMap(_collections_abc.MutableMapping): ''' A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can be accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. ''' def __init__(self, *maps): '''Initialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. ''' self.maps = list(maps) or [{}] # always at least one map def __missing__(self, key): raise KeyError(key) def __getitem__(self, key): for mapping in self.maps: try: return mapping[key] # can't use 'key in mapping' with defaultdict except KeyError: pass return self.__missing__(key) # support subclasses that define __missing__ def get(self, key, default=None): return self[key] if key in self else default def __len__(self): return len(set().union(*self.maps)) # reuses stored hash values if possible def __iter__(self): d = {} for mapping in reversed(self.maps): d.update(dict.fromkeys(mapping)) # reuses stored hash values if possible return iter(d) def __contains__(self, key): return any(key in m for m in self.maps) def __bool__(self): return any(self.maps) @_recursive_repr() def __repr__(self): return f'{self.__class__.__name__}({", ".join(map(repr, self.maps))})' @classmethod def fromkeys(cls, iterable, *args): 'Create a ChainMap with a single dict created from the iterable.' return cls(dict.fromkeys(iterable, *args)) def copy(self): 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' return self.__class__(self.maps[0].copy(), *self.maps[1:]) __copy__ = copy def new_child(self, m=None, **kwargs): # like Django's Context.push() '''New ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. Keyword arguments update the map or new empty dict. ''' if m is None: m = kwargs elif kwargs: m.update(kwargs) return self.__class__(m, *self.maps) @property def parents(self): # like Django's Context.pop() 'New ChainMap from maps[1:].' return self.__class__(*self.maps[1:]) def __setitem__(self, key, value): self.maps[0][key] = value def __delitem__(self, key): try: del self.maps[0][key] except KeyError: raise KeyError(f'Key not found in the first mapping: {key!r}') def popitem(self): 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' try: return self.maps[0].popitem() except KeyError: raise KeyError('No keys found in the first mapping.') def pop(self, key, *args): 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' try: return self.maps[0].pop(key, *args) except KeyError: raise KeyError(f'Key not found in the first mapping: {key!r}') def clear(self): 'Clear maps[0], leaving maps[1:] intact.' self.maps[0].clear() def __ior__(self, other): self.maps[0].update(other) return self def __or__(self, other): if not isinstance(other, _collections_abc.Mapping): return NotImplemented m = self.copy() m.maps[0].update(other) return m def __ror__(self, other): if not isinstance(other, _collections_abc.Mapping): return NotImplemented m = dict(other) for child in reversed(self.maps): m.update(child) return self.__class__(m) ################################################################################ ### UserDict ################################################################################ class UserDict(_collections_abc.MutableMapping): # Start by filling-out the abstract methods def __init__(self, dict=None, /, **kwargs): self.data = {} if dict is not None: self.update(dict) if kwargs: self.update(kwargs) def __len__(self): return len(self.data) def __getitem__(self, key): if key in self.data: return self.data[key] if hasattr(self.__class__, "__missing__"): return self.__class__.__missing__(self, key) raise KeyError(key) def __setitem__(self, key, item): self.data[key] = item def __delitem__(self, key): del self.data[key] def __iter__(self): return iter(self.data) # Modify __contains__ to work correctly when __missing__ is present def __contains__(self, key): return key in self.data # Now, add the methods in dicts but not in MutableMapping def __repr__(self): return repr(self.data) def __or__(self, other): if isinstance(other, UserDict): return self.__class__(self.data | other.data) if isinstance(other, dict): return self.__class__(self.data | other) return NotImplemented def __ror__(self, other): if isinstance(other, UserDict): return self.__class__(other.data | self.data) if isinstance(other, dict): return self.__class__(other | self.data) return NotImplemented def __ior__(self, other): if isinstance(other, UserDict): self.data |= other.data else: self.data |= other return self def __copy__(self): inst = self.__class__.__new__(self.__class__) inst.__dict__.update(self.__dict__) # Create a copy and avoid triggering descriptors inst.__dict__["data"] = self.__dict__["data"].copy() return inst def copy(self): if self.__class__ is UserDict: return UserDict(self.data.copy()) import copy data = self.data try: self.data = {} c = copy.copy(self) finally: self.data = data c.update(self) return c @classmethod def fromkeys(cls, iterable, value=None): d = cls() for key in iterable: d[key] = value return d ################################################################################ ### UserList ################################################################################ class UserList(_collections_abc.MutableSequence): """A more or less complete user-defined wrapper around list objects.""" def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlist) == type(self.data): self.data[:] = initlist elif isinstance(initlist, UserList): self.data[:] = initlist.data[:] else: self.data = list(initlist) def __repr__(self): return repr(self.data) def __lt__(self, other): return self.data < self.__cast(other) def __le__(self, other): return self.data <= self.__cast(other) def __eq__(self, other): return self.data == self.__cast(other) def __gt__(self, other): return self.data > self.__cast(other) def __ge__(self, other): return self.data >= self.__cast(other) def __cast(self, other): return other.data if isinstance(other, UserList) else other def __contains__(self, item): return item in self.data def __len__(self): return len(self.data) def __getitem__(self, i): if isinstance(i, slice): return self.__class__(self.data[i]) else: return self.data[i] def __setitem__(self, i, item): self.data[i] = item def __delitem__(self, i): del self.data[i] def __add__(self, other): if isinstance(other, UserList): return self.__class__(self.data + other.data) elif isinstance(other, type(self.data)): return self.__class__(self.data + other) return self.__class__(self.data + list(other)) def __radd__(self, other): if isinstance(other, UserList): return self.__class__(other.data + self.data) elif isinstance(other, type(self.data)): return self.__class__(other + self.data) return self.__class__(list(other) + self.data) def __iadd__(self, other): if isinstance(other, UserList): self.data += other.data elif isinstance(other, type(self.data)): self.data += other else: self.data += list(other) return self def __mul__(self, n): return self.__class__(self.data * n) __rmul__ = __mul__ def __imul__(self, n): self.data *= n return self def __copy__(self): inst = self.__class__.__new__(self.__class__) inst.__dict__.update(self.__dict__) # Create a copy and avoid triggering descriptors inst.__dict__["data"] = self.__dict__["data"][:] return inst def append(self, item): self.data.append(item) def insert(self, i, item): self.data.insert(i, item) def pop(self, i=-1): return self.data.pop(i) def remove(self, item): self.data.remove(item) def clear(self): self.data.clear() def copy(self): return self.__class__(self) def count(self, item): return self.data.count(item) def index(self, item, *args): return self.data.index(item, *args) def reverse(self): self.data.reverse() def sort(self, /, *args, **kwds): self.data.sort(*args, **kwds) def extend(self, other): if isinstance(other, UserList): self.data.extend(other.data) else: self.data.extend(other) ################################################################################ ### UserString ################################################################################ class UserString(_collections_abc.Sequence): def __init__(self, seq): if isinstance(seq, str): self.data = seq elif isinstance(seq, UserString): self.data = seq.data[:] else: self.data = str(seq) def __str__(self): return str(self.data) def __repr__(self): return repr(self.data) def __int__(self): return int(self.data) def __float__(self): return float(self.data) def __complex__(self): return complex(self.data) def __hash__(self): return hash(self.data) def __getnewargs__(self): return (self.data[:],) def __eq__(self, string): if isinstance(string, UserString): return self.data == string.data return self.data == string def __lt__(self, string): if isinstance(string, UserString): return self.data < string.data return self.data < string def __le__(self, string): if isinstance(string, UserString): return self.data <= string.data return self.data <= string def __gt__(self, string): if isinstance(string, UserString): return self.data > string.data return self.data > string def __ge__(self, string): if isinstance(string, UserString): return self.data >= string.data return self.data >= string def __contains__(self, char): if isinstance(char, UserString): char = char.data return char in self.data def __len__(self): return len(self.data) def __getitem__(self, index): return self.__class__(self.data[index]) def __add__(self, other): if isinstance(other, UserString): return self.__class__(self.data + other.data) elif isinstance(other, str): return self.__class__(self.data + other) return self.__class__(self.data + str(other)) def __radd__(self, other): if isinstance(other, str): return self.__class__(other + self.data) return self.__class__(str(other) + self.data) def __mul__(self, n): return self.__class__(self.data * n) __rmul__ = __mul__ def __mod__(self, args): return self.__class__(self.data % args) def __rmod__(self, template): return self.__class__(str(template) % self) # the following methods are defined in alphabetical order: def capitalize(self): return self.__class__(self.data.capitalize()) def casefold(self): return self.__class__(self.data.casefold()) def center(self, width, *args): return self.__class__(self.data.center(width, *args)) def count(self, sub, start=0, end=_sys.maxsize): if isinstance(sub, UserString): sub = sub.data return self.data.count(sub, start, end) def removeprefix(self, prefix, /): if isinstance(prefix, UserString): prefix = prefix.data return self.__class__(self.data.removeprefix(prefix)) def removesuffix(self, suffix, /): if isinstance(suffix, UserString): suffix = suffix.data return self.__class__(self.data.removesuffix(suffix)) def encode(self, encoding='utf-8', errors='strict'): encoding = 'utf-8' if encoding is None else encoding errors = 'strict' if errors is None else errors return self.data.encode(encoding, errors) def endswith(self, suffix, start=0, end=_sys.maxsize): return self.data.endswith(suffix, start, end) def expandtabs(self, tabsize=8): return self.__class__(self.data.expandtabs(tabsize)) def find(self, sub, start=0, end=_sys.maxsize): if isinstance(sub, UserString): sub = sub.data return self.data.find(sub, start, end) def format(self, /, *args, **kwds): return self.data.format(*args, **kwds) def format_map(self, mapping): return self.data.format_map(mapping) def index(self, sub, start=0, end=_sys.maxsize): return self.data.index(sub, start, end) def isalpha(self): return self.data.isalpha() def isalnum(self): return self.data.isalnum() def isascii(self): return self.data.isascii() def isdecimal(self): return self.data.isdecimal() def isdigit(self): return self.data.isdigit() def isidentifier(self): return self.data.isidentifier() def islower(self): return self.data.islower() def isnumeric(self): return self.data.isnumeric() def isprintable(self): return self.data.isprintable() def isspace(self): return self.data.isspace() def istitle(self): return self.data.istitle() def isupper(self): return self.data.isupper() def join(self, seq): return self.data.join(seq) def ljust(self, width, *args): return self.__class__(self.data.ljust(width, *args)) def lower(self): return self.__class__(self.data.lower()) def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars)) maketrans = str.maketrans def partition(self, sep): return self.data.partition(sep) def replace(self, old, new, maxsplit=-1): if isinstance(old, UserString): old = old.data if isinstance(new, UserString): new = new.data return self.__class__(self.data.replace(old, new, maxsplit)) def rfind(self, sub, start=0, end=_sys.maxsize): if isinstance(sub, UserString): sub = sub.data return self.data.rfind(sub, start, end) def rindex(self, sub, start=0, end=_sys.maxsize): return self.data.rindex(sub, start, end) def rjust(self, width, *args): return self.__class__(self.data.rjust(width, *args)) def rpartition(self, sep): return self.data.rpartition(sep) def rstrip(self, chars=None): return self.__class__(self.data.rstrip(chars)) def split(self, sep=None, maxsplit=-1): return self.data.split(sep, maxsplit) def rsplit(self, sep=None, maxsplit=-1): return self.data.rsplit(sep, maxsplit) def splitlines(self, keepends=False): return self.data.splitlines(keepends) def startswith(self, prefix, start=0, end=_sys.maxsize): return self.data.startswith(prefix, start, end) def strip(self, chars=None): return self.__class__(self.data.strip(chars)) def swapcase(self): return self.__class__(self.data.swapcase()) def title(self): return self.__class__(self.data.title()) def translate(self, *args): return self.__class__(self.data.translate(*args)) def upper(self): return self.__class__(self.data.upper()) def zfill(self, width): return self.__class__(self.data.zfill(width)) PK!wwabc.pynu[from _collections_abc import * from _collections_abc import __all__ from _collections_abc import _CallableGenericAlias PK!88#__pycache__/__init__.cpython-33.pyonu[ fc @sdddddddddg Zd d lTd d lZeejj7Zd d lmZmZd d lmZ m Z d dl m Zd d lZd d lZd dlmZd dlmZmZmZd dlmZGddde Z!Gddde"Z#dZ$dZ%dZ&e'e'ddZ(ddZ)yd dlm)Z)Wne*k r[YnXGddde"Z+Gddde,Z-Gddde,Z.Gddde/Z0Gd dde1Z2d S(!udequeu defaultdictu namedtupleuUserDictuUserListu UserStringuCounteru OrderedDictuChainMapi(u*N(udequeu defaultdict(u itemgetterueq(u iskeyword(uproxy(urepeatuchainustarmap(urecursive_reprcBs|EeZdZdZdS(u_Linkuprevunextukeyu __weakref__N(uprevunextukeyu __weakref__(u__name__u __module__u __qualname__u __slots__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu_Linksu_LinkcBsD|EeZdZdZddZejeeddZej ddZ dd Z d d Z d d Z d#ddZd#ddZddZejZZejZejZejZejZeZeddZd"ddZeddZddZddZ e!d"ddZ"d d!Z#d"S($u OrderedDictu)Dictionary that remembers insertion orderc Ost|dkr+tdt|ny |jWnMtk rt|_t|j|_}||_|_i|_ YnX|j ||dS(uInitialize an ordered dictionary. The signature is the same as regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary. iu$expected at most 1 arguments, got %dN( ulenu TypeErroru_OrderedDict__rootuAttributeErroru_Linku_OrderedDict__hardrootu_proxyuprevunextu_OrderedDict__mapu_OrderedDict__update(uselfuargsukwdsuroot((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__)s   uOrderedDict.__init__c Cs~||krj||j|<}|j}|j}||||_|_|_||_|||_n||||dS(u!od.__setitem__(i, y) <==> od[i]=yN(u_OrderedDict__mapu_OrderedDict__rootuprevunextukey( uselfukeyuvalueu dict_setitemuproxyuLinkulinkurootulast((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __setitem__:s    uOrderedDict.__setitem__cCsG||||jj|}|j}|j}||_||_dS(u od.__delitem__(y) <==> del od[y]N(u_OrderedDict__mapupopuprevunext(uselfukeyu dict_delitemulinku link_prevu link_next((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __delitem__Hs     uOrderedDict.__delitem__ccs:|j}|j}x!||k r5|jV|j}qWdS(uod.__iter__() <==> iter(od)N(u_OrderedDict__rootunextukey(uselfurootucurr((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iter__Ss   uOrderedDict.__iter__ccs:|j}|j}x!||k r5|jV|j}qWdS(u#od.__reversed__() <==> reversed(od)N(u_OrderedDict__rootuprevukey(uselfurootucurr((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reversed__\s   uOrderedDict.__reversed__cCs7|j}||_|_|jjtj|dS(u.od.clear() -> None. Remove all items from od.N(u_OrderedDict__rootuprevunextu_OrderedDict__mapuclearudict(uselfuroot((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucleares  uOrderedDict.clearcCs|stdn|j}|rK|j}|j}||_||_n$|j}|j}||_||_|j}|j|=tj||}||fS(uod.popitem() -> (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false. udictionary is empty(uKeyErroru_OrderedDict__rootuprevunextukeyu_OrderedDict__mapudictupop(uselfulasturootulinku link_prevu link_nextukeyuvalue((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyupopitemls            uOrderedDict.popitemcCs|j|}|j}|j}||_||_|j}|rn|j}||_||_||_|_n+|j}||_||_||_|_dS(uMove an existing element to the end (or beginning if last==False). Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key). N(u_OrderedDict__mapuprevunextu_OrderedDict__root(uselfukeyulastulinku link_prevu link_nexturootufirst((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu move_to_ends            uOrderedDict.move_to_endcCsqtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S(Nii(u_sysu getsizeofulenu__dict__u_OrderedDict__mapu_OrderedDict__hardrootu_OrderedDict__root(uselfusizeofunusize((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __sizeof__s uOrderedDict.__sizeof__cCsC||kr!||}||=|S||jkr?t|n|S(uod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. (u_OrderedDict__markeruKeyError(uselfukeyudefaulturesult((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyupops  uOrderedDict.popcCs"||kr||S|||<|S(uDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((uselfukeyudefault((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu setdefaults  uOrderedDict.setdefaultcCs7|sd|jjfSd|jjt|jfS(uod.__repr__() <==> repr(od)u%s()u%s(%r)(u __class__u__name__ulistuitems(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__suOrderedDict.__repr__cs~fddD}tj}x'ttD]}|j|dq;W|rnj|f|fSj|ffS(u%Return state information for picklingcs g|]}||gqS(((u.0uk(uself(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu s u*OrderedDict.__reduce__..N(uvarsucopyu OrderedDictupopuNoneu __class__(uselfuitemsu inst_dictuk((uselfu9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reduce__suOrderedDict.__reduce__cCs |j|S(u!od.copy() -> a shallow copy of od(u __class__(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopysuOrderedDict.copycCs(|}x|D]}||| New ordered dictionary with keys from S. If not specified, the value defaults to None. ((uclsuiterableuvalueuselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeyss  uOrderedDict.fromkeyscCsGt|tr7tj||o6ttt||Stj||S(uod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. (u isinstanceu OrderedDictudictu__eq__uallumapu_eq(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__eq__s(uOrderedDict.__eq__NT($u__name__u __module__u __qualname__u__doc__u__init__udictu __setitem__u_proxyu_Linku __delitem__u__iter__u __reversed__uclearuTrueupopitemu move_to_endu __sizeof__uMutableMappinguupdateu_OrderedDict__updateukeysuvaluesuitemsu__ne__uobjectu_OrderedDict__markerupopuNoneu setdefaultu_recursive_repru__repr__u __reduce__ucopyu classmethodufromkeysu__eq__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu OrderedDicts0           ufrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self @property def __dict__(self): 'A new OrderedDict mapping field names to their values' return OrderedDict(zip(self._fields, self)) def _asdict(self): '''Return a new OrderedDict which maps field names to their values. This method is obsolete. Use vars(nt) or nt.__dict__ instead. ''' return self.__dict__ def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) def __getstate__(self): 'Exclude the OrderedDict from pickling' return None {field_defs} u {name}=%ruW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') c Cst|tr*|jddj}nttt|}|rt}xot|D]^\}}|j st |s|j ds||krd|||>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessable by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) u,u u_u_%du8Type names and field names must be valid identifiers: %ru2Type names and field names cannot be a keyword: %ru/Field names cannot start with an underscore: %ru$Encountered duplicate field name: %rutypenameu field_namesu num_fieldsuarg_listu'uiurepr_fmtu, css!|]}tjd|VqdS(unameN(u_repr_templateuformat(u.0uname((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu jsunamedtuple..u field_defsu css-|]#\}}tjd|d|VqdS(uindexunameN(u_field_templateuformat(u.0uindexuname((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu lsu__name__u namedtuple_%su__main__i(u isinstanceustrureplaceusplitulistumapusetu enumerateu isidentifieru _iskeywordu startswithuaddu ValueErroru_class_templateuformatutupleulenureprujoinudictuexecu_sourceuprintu_sysu _getframeu f_globalsugetu __module__uAttributeError( utypenameu field_namesuverboseurenameuseenuindexunameuclass_definitionu namespaceuresult((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu namedtuple.s^              (    %cCs5|j}x%|D]}||dd||>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] c s!tj|j||dS(u Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args N(usuperu__init__uupdate(uselfuiterableukwds(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__s uCounter.__init__cCsdS(u1The count of elements not in the Counter is zero.i((uselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __missing__suCounter.__missing__cCsP|dkr.t|jdtdddStj||jdtdS(uList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abcdeabcdabcaba').most_common(3) [('a', 5), ('b', 4), ('c', 3)] ukeyiureverseNT(uNoneusorteduitemsu _itemgetteruTrueu_heapqunlargest(uselfun((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu most_commons "uCounter.most_commoncCstjtt|jS(uIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> product = 1 >>> for factor in prime_factors.elements(): # loop over factors ... product *= factor # and multiply them >>> product 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. (u_chainu from_iterableu_starmapu_repeatuitems(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuelementssuCounter.elementscCstddS(Nu@Counter.fromkeys() is undefined. Use Counter(iterable) instead.(uNotImplementedError(uclsuiterableuv((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeyssuCounter.fromkeysc s|dk rt|trt|ra|j}xD|jD]#\}}|||d||>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 iN(uNoneu isinstanceuMappingugetuitemsusuperuupdateu_count_elements(uselfuiterableukwdsuself_getuelemucount(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuupdates  uCounter.updatecKs|dk r|j}t|tr[x\|jD]#\}}||d|||>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 iiN(uNoneugetu isinstanceuMappinguitemsusubtract(uselfuiterableukwdsuself_getuelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyusubtract's   uCounter.subtractcCs |j|S(uReturn a shallow copy.(u __class__(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopyBsu Counter.copycCs|jt|ffS(N(u __class__udict(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reduce__FsuCounter.__reduce__cs#||krtj|ndS(uGLike dict.__delitem__() but does not raise KeyError for missing values.N(usuperu __delitem__(uselfuelem(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __delitem__Is uCounter.__delitem__c Cs|sd|jjSy9djtdj|j}d|jj|fSWn.tk r}dj|jjt|SYnXdS(Nu%s()u, u%r: %ru%s({%s})u {0}({1!r})( u __class__u__name__ujoinumapu__mod__u most_commonu TypeErroruformatudict(uselfuitems((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__Ns! uCounter.__repr__cCst|tstSt}xA|jD]3\}}|||}|dkr)|||>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__add__as  uCounter.__add__cCst|tstSt}xA|jD]3\}}|||}|dkr)|||>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__sub__ts  uCounter.__sub__cCst|tstSt}xU|jD]G\}}||}||krQ|n|}|dkr)|||>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountu other_countunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__or__s   uCounter.__or__cCsxt|tstSt}xU|jD]G\}}||}||krQ|n|}|dkr)|||>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountu other_countunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__and__s   uCounter.__and__cCs |tS(uEAdds an empty counter, effectively stripping negative and zero counts(uCounter(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__pos__suCounter.__pos__cCs t|S(u{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. (uCounter(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__neg__suCounter.__neg__cCs5dd|jD}x|D] }||=q W|S(u?Internal method to strip elements with a negative or zero countcSs(g|]\}}|dks|qS(i((u.0uelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu s u*Counter._keep_positive..(uitems(uselfu nonpositiveuelem((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu_keep_positives  uCounter._keep_positivecCs5x(|jD]\}}|||7>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iadd__s uCounter.__iadd__cCs5x(|jD]\}}|||8>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__isub__s uCounter.__isub__cCsJx=|jD]/\}}||}||kr |||>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemu other_countucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ior__s   uCounter.__ior__cCsJx=|jD]/\}}||}||kr |||>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) (uitemsu_keep_positive(uselfuotheruelemucountu other_count((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iand__s   uCounter.__iand__N(u__name__u __module__u __qualname__u__doc__uNoneu__init__u __missing__u most_commonuelementsu classmethodufromkeysuupdateusubtractucopyu __reduce__u __delitem__u__repr__u__add__u__sub__u__or__u__and__u__pos__u__neg__u_keep_positiveu__iadd__u__isub__u__ior__u__iand__(u __locals__((u __class__u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuCounters0+  !           cBs|EeZdZdZddZddZddZd&dd Zd d Z d d Z ddZ ddZ e ddZeddZddZeZddZeddZddZddZd d!Zd"d#Zd$d%Zd&S('uChainMapu A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. cGst|pig|_dS(uInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N(ulistumaps(uselfumaps((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__suChainMap.__init__cCst|dS(N(uKeyError(uselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __missing__suChainMap.__missing__c CsBx2|jD]'}y ||SWq tk r0Yq Xq W|j|S(N(umapsuKeyErroru __missing__(uselfukeyumapping((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __getitem__s    uChainMap.__getitem__cCs||kr||S|S(N((uselfukeyudefault((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyugetsu ChainMap.getcCsttj|jS(N(ulenusetuunionumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__len__suChainMap.__len__cCsttj|jS(N(uiterusetuunionumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iter__ suChainMap.__iter__cs tfdd|jDS(Nc3s|]}|kVqdS(N((u.0um(ukey(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu $su(ChainMap.__contains__..(uanyumaps(uselfukey((ukeyu9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __contains__#suChainMap.__contains__cCs t|jS(N(uanyumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__bool__&suChainMap.__bool__cCs%dj|djtt|jS(Nu{0.__class__.__name__}({1})u, (uformatujoinumapureprumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__)suChainMap.__repr__cGs|tj||S(u?Create a ChainMap with a single dict created from the iterable.(udictufromkeys(uclsuiterableuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeys.suChainMap.fromkeyscCs*|j|jdj|jddS(uHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]iiN(u __class__umapsucopy(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopy3su ChainMap.copycCs|ji|jS(u;New ChainMap with a new dict followed by all previous maps.(u __class__umaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu new_child9suChainMap.new_childcCs|j|jddS(uNew ChainMap from maps[1:].iN(u __class__umaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuparents=suChainMap.parentscCs||jd|Z#d?S(AuUserListuAA more or less complete user-defined wrapper around list objects.cCsg|_|dk rt|t|jkrF||jddZ$d?d@Z%dAdBZ&dCdDZ'dEdFZ(dGdHZ)dIdJZ*dKdLZ+dMdNZ,dOdPZ-dQdRZ.dSdTZ/dUdVZ0d|dWdXZ1dYdZZ2d}d\d]Z3d-ejd^d_Z4d-ejd`daZ5dbdcZ6dddeZ7d|dfdgZ8d|d~dhdiZ9d|ddjdkZ:ddldmZ<d-ejdndoZ=d|dpdqZ>drdsZ?dtduZ@dvdwZAdxdyZBdzd{ZCd|S(u UserStringcCsVt|tr||_n7t|trC|jdd|_nt||_dS(N(u isinstanceustrudatau UserString(uselfuseq((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__s  uUserString.__init__cCs t|jS(N(ustrudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__str__suUserString.__str__cCs t|jS(N(ureprudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__suUserString.__repr__cCs t|jS(N(uintudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__int__suUserString.__int__cCs t|jS(N(ufloatudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __float__suUserString.__float__cCs t|jS(N(ucomplexudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __complex__suUserString.__complex__cCs t|jS(N(uhashudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__hash__suUserString.__hash__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__eq__suUserString.__eq__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ne__suUserString.__ne__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__lt__suUserString.__lt__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__le__suUserString.__le__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__gt__suUserString.__gt__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ge__suUserString.__ge__cCs(t|tr|j}n||jkS(N(u isinstanceu UserStringudata(uselfuchar((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __contains__s uUserString.__contains__cCs t|jS(N(ulenudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__len__ suUserString.__len__cCs|j|j|S(N(u __class__udata(uselfuindex((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __getitem__suUserString.__getitem__cCsct|tr&|j|j|jSt|trI|j|j|S|j|jt|S(N(u isinstanceu UserStringu __class__udataustr(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__add__s uUserString.__add__cCs=t|tr#|j||jS|jt||jS(N(u isinstanceustru __class__udata(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__radd__suUserString.__radd__cCs|j|j|S(N(u __class__udata(uselfun((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__mul__suUserString.__mul__cCs|j|j|S(N(u __class__udata(uselfuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__mod__suUserString.__mod__cCs|j|jjS(N(u __class__udatau capitalize(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu capitalize suUserString.capitalizecGs|j|jj||S(N(u __class__udataucenter(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucenter!suUserString.centericCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataucount(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucount#s uUserString.countcCsW|rA|r(|j|jj||S|j|jj|S|j|jjS(N(u __class__udatauencode(uselfuencodinguerrors((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuencode's uUserString.encodecCs|jj|||S(N(udatauendswith(uselfusuffixustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuendswith-suUserString.endswithicCs|j|jj|S(N(u __class__udatau expandtabs(uselfutabsize((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu expandtabs/suUserString.expandtabscCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataufind(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufind1s uUserString.findcOs|jj||S(N(udatauformat(uselfuargsukwds((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuformat5suUserString.formatcCs|jj|||S(N(udatauindex(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuindex7suUserString.indexcCs |jjS(N(udatauisalpha(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisalpha9suUserString.isalphacCs |jjS(N(udatauisalnum(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisalnum:suUserString.isalnumcCs |jjS(N(udatau isdecimal(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isdecimal;suUserString.isdecimalcCs |jjS(N(udatauisdigit(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisdigit<suUserString.isdigitcCs |jjS(N(udatau isidentifier(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isidentifier=suUserString.isidentifiercCs |jjS(N(udatauislower(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuislower>suUserString.islowercCs |jjS(N(udatau isnumeric(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isnumeric?suUserString.isnumericcCs |jjS(N(udatauisspace(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisspace@suUserString.isspacecCs |jjS(N(udatauistitle(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuistitleAsuUserString.istitlecCs |jjS(N(udatauisupper(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisupperBsuUserString.isuppercCs|jj|S(N(udataujoin(uselfuseq((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyujoinCsuUserString.joincGs|j|jj||S(N(u __class__udatauljust(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuljustDsuUserString.ljustcCs|j|jjS(N(u __class__udataulower(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyulowerFsuUserString.lowercCs|j|jj|S(N(u __class__udataulstrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyulstripGsuUserString.lstripcCs|jj|S(N(udatau partition(uselfusep((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu partitionHsuUserString.partitionicCsUt|tr|j}nt|tr6|j}n|j|jj|||S(N(u isinstanceu UserStringudatau __class__ureplace(uselfuoldunewumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyureplaceJs   uUserString.replacecCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataurfind(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurfindPs uUserString.rfindcCs|jj|||S(N(udataurindex(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurindexTsuUserString.rindexcGs|j|jj||S(N(u __class__udataurjust(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurjustVsuUserString.rjustcCs|jj|S(N(udatau rpartition(uselfusep((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu rpartitionXsuUserString.rpartitioncCs|j|jj|S(N(u __class__udataurstrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurstripZsuUserString.rstripcCs|jj||S(N(udatausplit(uselfusepumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyusplit\suUserString.splitcCs|jj||S(N(udataursplit(uselfusepumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyursplit^suUserString.rsplitcCs|jj|S(N(udatau splitlines(uselfukeepends((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu splitlines`suUserString.splitlinescCs|jj|||S(N(udatau startswith(uselfuprefixustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu startswithasuUserString.startswithcCs|j|jj|S(N(u __class__udataustrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyustripcsuUserString.stripcCs|j|jjS(N(u __class__udatauswapcase(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuswapcasedsuUserString.swapcasecCs|j|jjS(N(u __class__udatautitle(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyutitleesuUserString.titlecGs|j|jj|S(N(u __class__udatau translate(uselfuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu translatefsuUserString.translatecCs|j|jjS(N(u __class__udatauupper(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuupperhsuUserString.uppercCs|j|jj|S(N(u __class__udatauzfill(uselfuwidth((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuzfillisuUserString.zfillNiiiF(Du__name__u __module__u __qualname__u__init__u__str__u__repr__u__int__u __float__u __complex__u__hash__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u __contains__u__len__u __getitem__u__add__u__radd__u__mul__u__rmul__u__mod__u capitalizeucenteru_sysumaxsizeucountuNoneuencodeuendswithu expandtabsufinduformatuindexuisalphauisalnumu isdecimaluisdigitu isidentifieruisloweru isnumericuisspaceuistitleuisupperujoinuljustulowerulstripu partitionureplaceurfindurindexurjustu rpartitionurstripusplitursplituFalseu splitlinesu startswithustripuswapcaseutitleu translateuupperuzfill(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu UserStringsz                                           (3u__all__ucollections.abcu collectionsuabcu _collectionsudequeu defaultdictuoperatoru itemgetteru _itemgetteruequ_equkeywordu iskeywordu _iskeywordusysu_sysuheapqu_heapquweakrefuproxyu_proxyu itertoolsurepeatu_repeatuchainu_chainustarmapu_starmapureprliburecursive_repru_recursive_repruobjectu_Linkudictu OrderedDictu_class_templateu_repr_templateu_field_templateuFalseu namedtupleu_count_elementsu ImportErroruCounteruMutableMappinguChainMapuUserDictuMutableSequenceuUserListuSequenceu UserString(((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyus<     [  hg4JPK!|w& #__pycache__/__main__.cpython-33.pycnu[ fc@sbddlmZddlmZmZedddZeddddZeeeeksktGd ddedd Zx0ed d ed dfD]Ze eqWGdddedd Ze eddj ddedej dZ e e j ddlZddlZeddZe eejedS(i(u namedtuple(uloadsudumpsuPointux, yuxi uyicBs8|EeZdZfZeddZddZdS(uPointcCs|jd|jddS(Nig?(uxuy(uself((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuhypotsu Point.hypotcCsd|j|j|jfS(Nu$Point: x=%6.3f y=%6.3f hypot=%6.3f(uxuyuhypot(uself((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyu__str__su Point.__str__N(u__name__u __module__u __qualname__u __slots__upropertyuhypotu__str__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuPoint sux yiiiig@cBs>|EeZdZdZfZeejZe ddZ dS(uPointuHPoint class with optimized _make() and _replace() without error-checkingcKs|j||jd|S(Nuxuy(uxuy(u_makeuget(uselfu_mapukwds((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyu_replacesuPoint._replaceN( u__name__u __module__u __qualname__u__doc__u __slots__u classmethodutupleu__new__u_makeumapu_replace(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuPointsi iiduPoint3DuzNu TestResultsufailed attemptedTgm۶m?(uz(u collectionsu namedtupleupickleuloadsudumpsuTrueuPointupuAssertionErroruprintu_replaceu_fieldsuPoint3Du__doc__udoctestu TestResultsutestmod(((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyus% PK!88#__pycache__/__init__.cpython-33.pycnu[ fc @sdddddddddg Zd d lTd d lZeejj7Zd d lmZmZd d lmZ m Z d dl m Zd d lZd d lZd dlmZd dlmZmZmZd dlmZGddde Z!Gddde"Z#dZ$dZ%dZ&e'e'ddZ(ddZ)yd dlm)Z)Wne*k r[YnXGddde"Z+Gddde,Z-Gddde,Z.Gddde/Z0Gd dde1Z2d S(!udequeu defaultdictu namedtupleuUserDictuUserListu UserStringuCounteru OrderedDictuChainMapi(u*N(udequeu defaultdict(u itemgetterueq(u iskeyword(uproxy(urepeatuchainustarmap(urecursive_reprcBs|EeZdZdZdS(u_Linkuprevunextukeyu __weakref__N(uprevunextukeyu __weakref__(u__name__u __module__u __qualname__u __slots__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu_Linksu_LinkcBsD|EeZdZdZddZejeeddZej ddZ dd Z d d Z d d Z d#ddZd#ddZddZejZZejZejZejZejZeZeddZd"ddZeddZddZddZ e!d"ddZ"d d!Z#d"S($u OrderedDictu)Dictionary that remembers insertion orderc Ost|dkr+tdt|ny |jWnMtk rt|_t|j|_}||_|_i|_ YnX|j ||dS(uInitialize an ordered dictionary. The signature is the same as regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary. iu$expected at most 1 arguments, got %dN( ulenu TypeErroru_OrderedDict__rootuAttributeErroru_Linku_OrderedDict__hardrootu_proxyuprevunextu_OrderedDict__mapu_OrderedDict__update(uselfuargsukwdsuroot((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__)s   uOrderedDict.__init__c Cs~||krj||j|<}|j}|j}||||_|_|_||_|||_n||||dS(u!od.__setitem__(i, y) <==> od[i]=yN(u_OrderedDict__mapu_OrderedDict__rootuprevunextukey( uselfukeyuvalueu dict_setitemuproxyuLinkulinkurootulast((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __setitem__:s    uOrderedDict.__setitem__cCsG||||jj|}|j}|j}||_||_dS(u od.__delitem__(y) <==> del od[y]N(u_OrderedDict__mapupopuprevunext(uselfukeyu dict_delitemulinku link_prevu link_next((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __delitem__Hs     uOrderedDict.__delitem__ccs:|j}|j}x!||k r5|jV|j}qWdS(uod.__iter__() <==> iter(od)N(u_OrderedDict__rootunextukey(uselfurootucurr((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iter__Ss   uOrderedDict.__iter__ccs:|j}|j}x!||k r5|jV|j}qWdS(u#od.__reversed__() <==> reversed(od)N(u_OrderedDict__rootuprevukey(uselfurootucurr((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reversed__\s   uOrderedDict.__reversed__cCs7|j}||_|_|jjtj|dS(u.od.clear() -> None. Remove all items from od.N(u_OrderedDict__rootuprevunextu_OrderedDict__mapuclearudict(uselfuroot((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucleares  uOrderedDict.clearcCs|stdn|j}|rK|j}|j}||_||_n$|j}|j}||_||_|j}|j|=tj||}||fS(uod.popitem() -> (k, v), return and remove a (key, value) pair. Pairs are returned in LIFO order if last is true or FIFO order if false. udictionary is empty(uKeyErroru_OrderedDict__rootuprevunextukeyu_OrderedDict__mapudictupop(uselfulasturootulinku link_prevu link_nextukeyuvalue((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyupopitemls            uOrderedDict.popitemcCs|j|}|j}|j}||_||_|j}|rn|j}||_||_||_|_n+|j}||_||_||_|_dS(uMove an existing element to the end (or beginning if last==False). Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key). N(u_OrderedDict__mapuprevunextu_OrderedDict__root(uselfukeyulastulinku link_prevu link_nexturootufirst((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu move_to_ends            uOrderedDict.move_to_endcCsqtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S(Nii(u_sysu getsizeofulenu__dict__u_OrderedDict__mapu_OrderedDict__hardrootu_OrderedDict__root(uselfusizeofunusize((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __sizeof__s uOrderedDict.__sizeof__cCsC||kr!||}||=|S||jkr?t|n|S(uod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. (u_OrderedDict__markeruKeyError(uselfukeyudefaulturesult((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyupops  uOrderedDict.popcCs"||kr||S|||<|S(uDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od((uselfukeyudefault((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu setdefaults  uOrderedDict.setdefaultcCs7|sd|jjfSd|jjt|jfS(uod.__repr__() <==> repr(od)u%s()u%s(%r)(u __class__u__name__ulistuitems(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__suOrderedDict.__repr__cs~fddD}tj}x'ttD]}|j|dq;W|rnj|f|fSj|ffS(u%Return state information for picklingcs g|]}||gqS(((u.0uk(uself(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu s u*OrderedDict.__reduce__..N(uvarsucopyu OrderedDictupopuNoneu __class__(uselfuitemsu inst_dictuk((uselfu9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reduce__suOrderedDict.__reduce__cCs |j|S(u!od.copy() -> a shallow copy of od(u __class__(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopysuOrderedDict.copycCs(|}x|D]}||| New ordered dictionary with keys from S. If not specified, the value defaults to None. ((uclsuiterableuvalueuselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeyss  uOrderedDict.fromkeyscCsGt|tr7tj||o6ttt||Stj||S(uod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. (u isinstanceu OrderedDictudictu__eq__uallumapu_eq(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__eq__s(uOrderedDict.__eq__NT($u__name__u __module__u __qualname__u__doc__u__init__udictu __setitem__u_proxyu_Linku __delitem__u__iter__u __reversed__uclearuTrueupopitemu move_to_endu __sizeof__uMutableMappinguupdateu_OrderedDict__updateukeysuvaluesuitemsu__ne__uobjectu_OrderedDict__markerupopuNoneu setdefaultu_recursive_repru__repr__u __reduce__ucopyu classmethodufromkeysu__eq__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu OrderedDicts0           ufrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self @property def __dict__(self): 'A new OrderedDict mapping field names to their values' return OrderedDict(zip(self._fields, self)) def _asdict(self): '''Return a new OrderedDict which maps field names to their values. This method is obsolete. Use vars(nt) or nt.__dict__ instead. ''' return self.__dict__ def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) def __getstate__(self): 'Exclude the OrderedDict from pickling' return None {field_defs} u {name}=%ruW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') c Cst|tr*|jddj}nttt|}|rt}xot|D]^\}}|j st |s|j ds||krd|||>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessable by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) u,u u_u_%du8Type names and field names must be valid identifiers: %ru2Type names and field names cannot be a keyword: %ru/Field names cannot start with an underscore: %ru$Encountered duplicate field name: %rutypenameu field_namesu num_fieldsuarg_listu'uiurepr_fmtu, css!|]}tjd|VqdS(unameN(u_repr_templateuformat(u.0uname((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu jsunamedtuple..u field_defsu css-|]#\}}tjd|d|VqdS(uindexunameN(u_field_templateuformat(u.0uindexuname((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu lsu__name__u namedtuple_%su__main__i(u isinstanceustrureplaceusplitulistumapusetu enumerateu isidentifieru _iskeywordu startswithuaddu ValueErroru_class_templateuformatutupleulenureprujoinudictuexecu_sourceuprintu_sysu _getframeu f_globalsugetu __module__uAttributeError( utypenameu field_namesuverboseurenameuseenuindexunameuclass_definitionu namespaceuresult((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu namedtuple.s^              (    %cCs5|j}x%|D]}||dd||>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] c s!tj|j||dS(u Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args N(usuperu__init__uupdate(uselfuiterableukwds(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__s uCounter.__init__cCsdS(u1The count of elements not in the Counter is zero.i((uselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __missing__suCounter.__missing__cCsP|dkr.t|jdtdddStj||jdtdS(uList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abcdeabcdabcaba').most_common(3) [('a', 5), ('b', 4), ('c', 3)] ukeyiureverseNT(uNoneusorteduitemsu _itemgetteruTrueu_heapqunlargest(uselfun((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu most_commons "uCounter.most_commoncCstjtt|jS(uIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> product = 1 >>> for factor in prime_factors.elements(): # loop over factors ... product *= factor # and multiply them >>> product 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. (u_chainu from_iterableu_starmapu_repeatuitems(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuelementssuCounter.elementscCstddS(Nu@Counter.fromkeys() is undefined. Use Counter(iterable) instead.(uNotImplementedError(uclsuiterableuv((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeyssuCounter.fromkeysc s|dk rt|trt|ra|j}xD|jD]#\}}|||d||>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 iN(uNoneu isinstanceuMappingugetuitemsusuperuupdateu_count_elements(uselfuiterableukwdsuself_getuelemucount(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuupdates  uCounter.updatecKs|dk r|j}t|tr[x\|jD]#\}}||d|||>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 iiN(uNoneugetu isinstanceuMappinguitemsusubtract(uselfuiterableukwdsuself_getuelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyusubtract's   uCounter.subtractcCs |j|S(uReturn a shallow copy.(u __class__(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopyBsu Counter.copycCs|jt|ffS(N(u __class__udict(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __reduce__FsuCounter.__reduce__cs#||krtj|ndS(uGLike dict.__delitem__() but does not raise KeyError for missing values.N(usuperu __delitem__(uselfuelem(u __class__(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __delitem__Is uCounter.__delitem__c Cs|sd|jjSy9djtdj|j}d|jj|fSWn.tk r}dj|jjt|SYnXdS(Nu%s()u, u%r: %ru%s({%s})u {0}({1!r})( u __class__u__name__ujoinumapu__mod__u most_commonu TypeErroruformatudict(uselfuitems((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__Ns! uCounter.__repr__cCst|tstSt}xA|jD]3\}}|||}|dkr)|||>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__add__as  uCounter.__add__cCst|tstSt}xA|jD]3\}}|||}|dkr)|||>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__sub__ts  uCounter.__sub__cCst|tstSt}xU|jD]G\}}||}||krQ|n|}|dkr)|||>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountu other_countunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__or__s   uCounter.__or__cCsxt|tstSt}xU|jD]G\}}||}||krQ|n|}|dkr)|||>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) i(u isinstanceuCounteruNotImplementeduitems(uselfuotheruresultuelemucountu other_countunewcount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__and__s   uCounter.__and__cCs |tS(uEAdds an empty counter, effectively stripping negative and zero counts(uCounter(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__pos__suCounter.__pos__cCs t|S(u{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. (uCounter(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__neg__suCounter.__neg__cCs5dd|jD}x|D] }||=q W|S(u?Internal method to strip elements with a negative or zero countcSs(g|]\}}|dks|qS(i((u.0uelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu s u*Counter._keep_positive..(uitems(uselfu nonpositiveuelem((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu_keep_positives  uCounter._keep_positivecCs5x(|jD]\}}|||7>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iadd__s uCounter.__iadd__cCs5x(|jD]\}}|||8>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__isub__s uCounter.__isub__cCsJx=|jD]/\}}||}||kr |||>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) (uitemsu_keep_positive(uselfuotheruelemu other_countucount((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ior__s   uCounter.__ior__cCsJx=|jD]/\}}||}||kr |||>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) (uitemsu_keep_positive(uselfuotheruelemucountu other_count((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iand__s   uCounter.__iand__N(u__name__u __module__u __qualname__u__doc__uNoneu__init__u __missing__u most_commonuelementsu classmethodufromkeysuupdateusubtractucopyu __reduce__u __delitem__u__repr__u__add__u__sub__u__or__u__and__u__pos__u__neg__u_keep_positiveu__iadd__u__isub__u__ior__u__iand__(u __locals__((u __class__u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuCounters0+  !           cBs|EeZdZdZddZddZddZd&dd Zd d Z d d Z ddZ ddZ e ddZeddZddZeZddZeddZddZddZd d!Zd"d#Zd$d%Zd&S('uChainMapu A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. cGst|pig|_dS(uInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N(ulistumaps(uselfumaps((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__suChainMap.__init__cCst|dS(N(uKeyError(uselfukey((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __missing__suChainMap.__missing__c CsBx2|jD]'}y ||SWq tk r0Yq Xq W|j|S(N(umapsuKeyErroru __missing__(uselfukeyumapping((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __getitem__s    uChainMap.__getitem__cCs||kr||S|S(N((uselfukeyudefault((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyugetsu ChainMap.getcCsttj|jS(N(ulenusetuunionumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__len__suChainMap.__len__cCsttj|jS(N(uiterusetuunionumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__iter__ suChainMap.__iter__cs tfdd|jDS(Nc3s|]}|kVqdS(N((u.0um(ukey(u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu $su(ChainMap.__contains__..(uanyumaps(uselfukey((ukeyu9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __contains__#suChainMap.__contains__cCs t|jS(N(uanyumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__bool__&suChainMap.__bool__cCs%dj|djtt|jS(Nu{0.__class__.__name__}({1})u, (uformatujoinumapureprumaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__)suChainMap.__repr__cGs|tj||S(u?Create a ChainMap with a single dict created from the iterable.(udictufromkeys(uclsuiterableuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufromkeys.suChainMap.fromkeyscCs*|j|jdj|jddS(uHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]iiN(u __class__umapsucopy(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucopy3su ChainMap.copycCs|ji|jS(u;New ChainMap with a new dict followed by all previous maps.(u __class__umaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu new_child9suChainMap.new_childcCs|j|jddS(uNew ChainMap from maps[1:].iN(u __class__umaps(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuparents=suChainMap.parentscCs||jd|Z#d?S(AuUserListuAA more or less complete user-defined wrapper around list objects.cCsg|_|dk rt|t|jkrF||jddZ$d?d@Z%dAdBZ&dCdDZ'dEdFZ(dGdHZ)dIdJZ*dKdLZ+dMdNZ,dOdPZ-dQdRZ.dSdTZ/dUdVZ0d|dWdXZ1dYdZZ2d}d\d]Z3d-ejd^d_Z4d-ejd`daZ5dbdcZ6dddeZ7d|dfdgZ8d|d~dhdiZ9d|ddjdkZ:ddldmZ<d-ejdndoZ=d|dpdqZ>drdsZ?dtduZ@dvdwZAdxdyZBdzd{ZCd|S(u UserStringcCsVt|tr||_n7t|trC|jdd|_nt||_dS(N(u isinstanceustrudatau UserString(uselfuseq((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__init__s  uUserString.__init__cCs t|jS(N(ustrudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__str__suUserString.__str__cCs t|jS(N(ureprudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__repr__suUserString.__repr__cCs t|jS(N(uintudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__int__suUserString.__int__cCs t|jS(N(ufloatudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __float__suUserString.__float__cCs t|jS(N(ucomplexudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __complex__suUserString.__complex__cCs t|jS(N(uhashudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__hash__suUserString.__hash__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__eq__suUserString.__eq__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ne__suUserString.__ne__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__lt__suUserString.__lt__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__le__suUserString.__le__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__gt__suUserString.__gt__cCs,t|tr|j|jkS|j|kS(N(u isinstanceu UserStringudata(uselfustring((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__ge__suUserString.__ge__cCs(t|tr|j}n||jkS(N(u isinstanceu UserStringudata(uselfuchar((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __contains__s uUserString.__contains__cCs t|jS(N(ulenudata(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__len__ suUserString.__len__cCs|j|j|S(N(u __class__udata(uselfuindex((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu __getitem__suUserString.__getitem__cCsct|tr&|j|j|jSt|trI|j|j|S|j|jt|S(N(u isinstanceu UserStringu __class__udataustr(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__add__s uUserString.__add__cCs=t|tr#|j||jS|jt||jS(N(u isinstanceustru __class__udata(uselfuother((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__radd__suUserString.__radd__cCs|j|j|S(N(u __class__udata(uselfun((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__mul__suUserString.__mul__cCs|j|j|S(N(u __class__udata(uselfuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu__mod__suUserString.__mod__cCs|j|jjS(N(u __class__udatau capitalize(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu capitalize suUserString.capitalizecGs|j|jj||S(N(u __class__udataucenter(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucenter!suUserString.centericCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataucount(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyucount#s uUserString.countcCsW|rA|r(|j|jj||S|j|jj|S|j|jjS(N(u __class__udatauencode(uselfuencodinguerrors((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuencode's uUserString.encodecCs|jj|||S(N(udatauendswith(uselfusuffixustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuendswith-suUserString.endswithicCs|j|jj|S(N(u __class__udatau expandtabs(uselfutabsize((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu expandtabs/suUserString.expandtabscCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataufind(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyufind1s uUserString.findcOs|jj||S(N(udatauformat(uselfuargsukwds((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuformat5suUserString.formatcCs|jj|||S(N(udatauindex(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuindex7suUserString.indexcCs |jjS(N(udatauisalpha(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisalpha9suUserString.isalphacCs |jjS(N(udatauisalnum(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisalnum:suUserString.isalnumcCs |jjS(N(udatau isdecimal(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isdecimal;suUserString.isdecimalcCs |jjS(N(udatauisdigit(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisdigit<suUserString.isdigitcCs |jjS(N(udatau isidentifier(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isidentifier=suUserString.isidentifiercCs |jjS(N(udatauislower(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuislower>suUserString.islowercCs |jjS(N(udatau isnumeric(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu isnumeric?suUserString.isnumericcCs |jjS(N(udatauisspace(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisspace@suUserString.isspacecCs |jjS(N(udatauistitle(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuistitleAsuUserString.istitlecCs |jjS(N(udatauisupper(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuisupperBsuUserString.isuppercCs|jj|S(N(udataujoin(uselfuseq((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyujoinCsuUserString.joincGs|j|jj||S(N(u __class__udatauljust(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuljustDsuUserString.ljustcCs|j|jjS(N(u __class__udataulower(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyulowerFsuUserString.lowercCs|j|jj|S(N(u __class__udataulstrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyulstripGsuUserString.lstripcCs|jj|S(N(udatau partition(uselfusep((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu partitionHsuUserString.partitionicCsUt|tr|j}nt|tr6|j}n|j|jj|||S(N(u isinstanceu UserStringudatau __class__ureplace(uselfuoldunewumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyureplaceJs   uUserString.replacecCs1t|tr|j}n|jj|||S(N(u isinstanceu UserStringudataurfind(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurfindPs uUserString.rfindcCs|jj|||S(N(udataurindex(uselfusubustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurindexTsuUserString.rindexcGs|j|jj||S(N(u __class__udataurjust(uselfuwidthuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurjustVsuUserString.rjustcCs|jj|S(N(udatau rpartition(uselfusep((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu rpartitionXsuUserString.rpartitioncCs|j|jj|S(N(u __class__udataurstrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyurstripZsuUserString.rstripcCs|jj||S(N(udatausplit(uselfusepumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyusplit\suUserString.splitcCs|jj||S(N(udataursplit(uselfusepumaxsplit((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyursplit^suUserString.rsplitcCs|jj|S(N(udatau splitlines(uselfukeepends((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu splitlines`suUserString.splitlinescCs|jj|||S(N(udatau startswith(uselfuprefixustartuend((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu startswithasuUserString.startswithcCs|j|jj|S(N(u __class__udataustrip(uselfuchars((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyustripcsuUserString.stripcCs|j|jjS(N(u __class__udatauswapcase(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuswapcasedsuUserString.swapcasecCs|j|jjS(N(u __class__udatautitle(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyutitleesuUserString.titlecGs|j|jj|S(N(u __class__udatau translate(uselfuargs((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu translatefsuUserString.translatecCs|j|jjS(N(u __class__udatauupper(uself((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuupperhsuUserString.uppercCs|j|jj|S(N(u __class__udatauzfill(uselfuwidth((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyuzfillisuUserString.zfillNiiiF(Du__name__u __module__u __qualname__u__init__u__str__u__repr__u__int__u __float__u __complex__u__hash__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u __contains__u__len__u __getitem__u__add__u__radd__u__mul__u__rmul__u__mod__u capitalizeucenteru_sysumaxsizeucountuNoneuencodeuendswithu expandtabsufinduformatuindexuisalphauisalnumu isdecimaluisdigitu isidentifieruisloweru isnumericuisspaceuistitleuisupperujoinuljustulowerulstripu partitionureplaceurfindurindexurjustu rpartitionurstripusplitursplituFalseu splitlinesu startswithustripuswapcaseutitleu translateuupperuzfill(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyu UserStringsz                                           (3u__all__ucollections.abcu collectionsuabcu _collectionsudequeu defaultdictuoperatoru itemgetteru _itemgetteruequ_equkeywordu iskeywordu _iskeywordusysu_sysuheapqu_heapquweakrefuproxyu_proxyu itertoolsurepeatu_repeatuchainu_chainustarmapu_starmapureprliburecursive_repru_recursive_repruobjectu_Linkudictu OrderedDictu_class_templateu_repr_templateu_field_templateuFalseu namedtupleu_count_elementsu ImportErroruCounteruMutableMappinguChainMapuUserDictuMutableSequenceuUserListuSequenceu UserString(((u9/opt/alt/python33/lib64/python3.3/collections/__init__.pyus<     [  hg4JPK!VۍR R #__pycache__/__main__.cpython-33.pyonu[ fc@sDddlmZddlmZmZedddZeddddZGd ddedd Zx0ed d ed dfD]ZeeqWGdddedd Zeeddj ddedej dZ ee j ddl Z ddlZeddZeee jedS(i(u namedtuple(uloadsudumpsuPointux, yuxi uyicBs8|EeZdZfZeddZddZdS(uPointcCs|jd|jddS(Nig?(uxuy(uself((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuhypotsu Point.hypotcCsd|j|j|jfS(Nu$Point: x=%6.3f y=%6.3f hypot=%6.3f(uxuyuhypot(uself((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyu__str__su Point.__str__N(u__name__u __module__u __qualname__u __slots__upropertyuhypotu__str__(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuPoint sux yiiiig@cBs>|EeZdZdZfZeejZe ddZ dS(uPointuHPoint class with optimized _make() and _replace() without error-checkingcKs|j||jd|S(Nuxuy(uxuy(u_makeuget(uselfu_mapukwds((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyu_replacesuPoint._replaceN( u__name__u __module__u __qualname__u__doc__u __slots__u classmethodutupleu__new__u_makeumapu_replace(u __locals__((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyuPointsi iiduPoint3DuzNu TestResultsufailed attemptedTgm۶m?(uz(u collectionsu namedtupleupickleuloadsudumpsuTrueuPointupuprintu_replaceu_fieldsuPoint3Du__doc__udoctestu TestResultsutestmod(((u9/opt/alt/python33/lib64/python3.3/collections/__main__.pyus% PK!ݿ__pycache__/abc.cpython-33.pyonu[ fJc@sdZddlmZmZddlZdddddd d d d d dddddddgZeedZeee Z eeij Z eeij ZeeijZeegZeeegZeeedZeeeZeedZeefZeeeZeij Zeij ZeijZeejZ GddddeZ!GddddeZ"Gddde"Z#e#j$ee#j$e e#j$e e#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$eGddddeZ%GddddeZ&Gdd d deZ'Gdd d e%e"e&Z(e(j$e)Gdd d e(Z*e*j$eGd d d e%e"e&Z+e+j$e Gd!dde%Z,Gd"dde,e(Z-e-j$eGd#dde,e(Z.e.j$eGd$dde,Z/e/j$eGd%d d e+Z0e0j$e1Gd&dde%e"e&Z2e2j$e3e2j$e4e2j$eGd'dde2Z5e5j$e6e5j$e Gd(dde2Z7e7j$e8e7j$e dS()ujAbstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. i(uABCMetauabstractmethodNuHashableuIterableuIteratoruSizedu ContaineruCallableuSetu MutableSetuMappinguMutableMappingu MappingViewuKeysViewu ItemsViewu ValuesViewuSequenceuMutableSequenceu ByteStringsucBs>|EeZdZfZeddZeddZdS(uHashablecCsdS(Ni((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__hash__7suHashable.__hash__cCsK|tkrGx8|jD]*}d|jkr|jdr<dSPqqWntS(Nu__hash__T(uHashableu__mro__u__dict__uTrueuNotImplemented(uclsuCuB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__;s   uHashable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__hash__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuHashable3su metaclasscBs>|EeZdZfZeddZeddZdS(uIterableccsdS(N((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__JsuIterable.__iter__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__iter__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu Rsu,Iterable.__subclasshook__..T(uIterableuanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__Os uIterable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__iter__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuIterableFscBsJ|EeZdZfZeddZddZeddZdS(uIteratorcCs tdS(uKReturn the next item from the iterator. When exhausted, raise StopIterationN(u StopIteration(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__next__[suIterator.__next__cCs|S(N((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__`suIterator.__iter__cCsO|tkrKtdd|jDrKtdd|jDrKdSntS(Ncss|]}d|jkVqdS(u__next__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu fsu,Iterator.__subclasshook__..css|]}d|jkVqdS(u__iter__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu gsT(uIteratoruanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__cs  uIterator.__subclasshook__N( u__name__u __module__u __qualname__u __slots__uabstractmethodu__next__u__iter__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuIteratorWs cBs>|EeZdZfZeddZeddZdS(uSizedcCsdS(Ni((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__len__}su Sized.__len__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__len__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su)Sized.__subclasshook__..T(uSizeduanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uSized.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__len__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSizedyscBs>|EeZdZfZeddZeddZdS(u ContainercCsdS(NF(uFalse(uselfux((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suContainer.__contains__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u __contains__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su-Container.__subclasshook__..T(u Containeruanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uContainer.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu __contains__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ContainerscBs>|EeZdZfZeddZeddZdS(uCallablecOsdS(NF(uFalse(uselfuargsukwds((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__call__suCallable.__call__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__call__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su,Callable.__subclasshook__..T(uCallableuanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uCallable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__call__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuCallablescBs|EeZdZdZfZddZddZddZdd Zd d Z d d Z e ddZ ddZ ddZddZddZddZddZdS(uSetuhA set is a finite, iterable container. This class provides concrete generic implementations of all methods except for __contains__, __iter__ and __len__. To override the comparisons (presumably for speed, as the semantics are fixed), all you have to do is redefine __le__ and then the other operations will automatically follow suit. cCsTt|tstSt|t|kr/dSx|D]}||kr6dSq6WdS(NFT(u isinstanceuSetuNotImplementedulenuFalseuTrue(uselfuotheruelem((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__le__s  u Set.__le__cCs8t|tstSt|t|ko7|j|S(N(u isinstanceuSetuNotImplementedulenu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__lt__su Set.__lt__cCs t|tstS|j|S(N(u isinstanceuSetuNotImplementedu__lt__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__gt__su Set.__gt__cCs t|tstS|j|S(N(u isinstanceuSetuNotImplementedu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ge__su Set.__ge__cCs8t|tstSt|t|ko7|j|S(N(u isinstanceuSetuNotImplementedulenu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__eq__su Set.__eq__cCs ||k S(N((uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ne__su Set.__ne__cCs ||S(uConstruct an instance of the class from any iterable input. Must override this method if the class constructor signature does not accept an iterable for an input. ((uclsuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuSet._from_iterablecs3t|tstSjfdd|DS(Nc3s!|]}|kr|VqdS(N((u.0uvalue(uself(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__and__..(u isinstanceuIterableuNotImplementedu_from_iterable(uselfuother((uselfu4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__and__su Set.__and__cCs%x|D]}||krdSqWdS(u1Return True if two sets have a null intersection.FT(uFalseuTrue(uselfuotheruvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu isdisjoints  uSet.isdisjointcCs9t|tstSdd||fD}|j|S(Ncss"|]}|D] }|Vq qdS(N((u.0usue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__or__..(u isinstanceuIterableuNotImplementedu_from_iterable(uselfuotheruchain((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__or__su Set.__or__csTtts4tts"tS|jn|jfdd|DS(Nc3s!|]}|kr|VqdS(N((u.0uvalue(uother(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__sub__..(u isinstanceuSetuIterableuNotImplementedu_from_iterable(uselfuother((uotheru4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__sub__s u Set.__sub__cCsDt|ts4t|ts"tS|j|}n||||BS(N(u isinstanceuSetuIterableuNotImplementedu_from_iterable(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__xor__s u Set.__xor__cCstj}d|d}t|}d|d}||M}x>|D]6}t|}|||d>AdAdN}||M}qBW|dd}||M}||kr||d8}n|d krd }n|S( u+Compute the hash value of a set. Note that we don't define __hash__: not all sets are hashable. But if you define a hashable set type, its __hash__ should call this function. This must be compatible __eq__. All sets ought to compare equal if they contain the same elements, regardless of how they are implemented, and regardless of the order of the elements; so there's not much freedom for __eq__ or __hash__. We match the algorithm used by the built-in frozenset type. iiiMriiM[l4~2i i6i8#i(usysumaxsizeulenuhash(uselfuMAXuMASKunuhuxuhx((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_hashs          u Set._hashN(u__name__u __module__u __qualname__u__doc__u __slots__u__le__u__lt__u__gt__u__ge__u__eq__u__ne__u classmethodu_from_iterableu__and__u isdisjointu__or__u__sub__u__xor__u_hash(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSets           cBs|EeZdZdZfZeddZeddZddZdd Z d d Z d d Z ddZ ddZ ddZdS(u MutableSetuA mutable set is a finite, iterable container. This class provides concrete generic implementations of all methods except for __contains__, __iter__, __len__, add(), and discard(). To override the comparisons (presumably for speed, as the semantics are fixed), all you have to do is redefine __le__ and then the other operations will automatically follow suit. cCs tdS(uAdd an element.N(uNotImplementedError(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuadd6suMutableSet.addcCs tdS(u8Remove an element. Do not raise an exception if absent.N(uNotImplementedError(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyudiscard;suMutableSet.discardcCs,||krt|n|j|dS(u5Remove an element. If not a member, raise a KeyError.N(uKeyErrorudiscard(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuremove@s uMutableSet.removec CsHt|}yt|}Wntk r6tYnX|j||S(u2Return the popped value. Raise KeyError if empty.(uiterunextu StopIterationuKeyErrorudiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupopFs    uMutableSet.popc Cs-yx |jqWntk r(YnXdS(u6This is slow (creates N new iterators!) but effective.N(upopuKeyError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclearPs  uMutableSet.clearcCs"x|D]}|j|qW|S(N(uadd(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ior__Xs uMutableSet.__ior__cCs&x||D]}|j|q W|S(N(udiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iand__]suMutableSet.__iand__cCsx||kr|jn[t|ts:|j|}nx7|D]/}||krc|j|qA|j|qAW|S(N(uclearu isinstanceuSetu_from_iterableudiscarduadd(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ixor__bs    uMutableSet.__ixor__cCs;||kr|jnx|D]}|j|q W|S(N(uclearudiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__isub__os    uMutableSet.__isub__N(u__name__u __module__u __qualname__u__doc__u __slots__uabstractmethoduaddudiscarduremoveupopuclearu__ior__u__iand__u__ixor__u__isub__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu MutableSet(s      cBs|EeZdZfZeddZdddZddZddZ d d Z d d Z d dZ ddZ dS(uMappingcCs tdS(N(uKeyError(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __getitem__suMapping.__getitem__c Cs)y ||SWntk r$|SYnXdS(u<D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.N(uKeyError(uselfukeyudefault((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyugets  u Mapping.getc Cs-y ||Wntk r$dSYnXdSdS(NFT(uKeyErroruFalseuTrue(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__s    uMapping.__contains__cCs t|S(u:D.keys() -> a set-like object providing a view on D's keys(uKeysView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyukeyssu Mapping.keyscCs t|S(u<D.items() -> a set-like object providing a view on D's items(u ItemsView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuitemssu Mapping.itemscCs t|S(u6D.values() -> an object providing a view on D's values(u ValuesView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuvaluessuMapping.valuescCs5t|tstSt|jt|jkS(N(u isinstanceuMappinguNotImplementedudictuitems(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__eq__suMapping.__eq__cCs ||k S(N((uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ne__suMapping.__ne__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu __getitem__uNoneugetu __contains__ukeysuitemsuvaluesu__eq__u__ne__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMapping}s      cBs8|EeZdZddZddZddZdS(u MappingViewcCs ||_dS(N(u_mapping(uselfumapping((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__init__suMappingView.__init__cCs t|jS(N(ulenu_mapping(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__len__suMappingView.__len__cCs dj|S(Nu&{0.__class__.__name__}({0._mapping!r})(uformat(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__repr__suMappingView.__repr__N(u__name__u __module__u __qualname__u__init__u__len__u__repr__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu MappingViews  cBs>|EeZdZeddZddZddZdS(uKeysViewcCs t|S(N(uset(uselfuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuKeysView._from_iterablecCs ||jkS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suKeysView.__contains__ccsx|jD] }|Vq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suKeysView.__iter__N(u__name__u __module__u __qualname__u classmethodu_from_iterableu __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuKeysViews cBs>|EeZdZeddZddZddZdS(u ItemsViewcCs t|S(N(uset(uselfuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuItemsView._from_iterablec CsD|\}}y|j|}Wntk r5dSYn X||kSdS(NF(u_mappinguKeyErroruFalse(uselfuitemukeyuvalueuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__s    uItemsView.__contains__ccs*x#|jD]}||j|fVq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suItemsView.__iter__N(u__name__u __module__u __qualname__u classmethodu_from_iterableu __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ItemsViews cBs,|EeZdZddZddZdS(u ValuesViewcCs/x(|jD]}||j|kr dSq WdS(NTF(u_mappinguTrueuFalse(uselfuvalueukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suValuesView.__contains__ccs$x|jD]}|j|Vq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suValuesView.__iter__N(u__name__u __module__u __qualname__u __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ValuesViews cBs|EeZdZfZeddZeddZeZeddZ ddZ d d Z d d Z dd dZdS(uMutableMappingcCs tdS(N(uKeyError(uselfukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __setitem__suMutableMapping.__setitem__cCs tdS(N(uKeyError(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __delitem__suMutableMapping.__delitem__c CsKy||}Wn+tk r;||jkr3n|SYn X||=|SdS(uD.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. N(uKeyErroru_MutableMapping__marker(uselfukeyudefaultuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupop s  uMutableMapping.popc CsLytt|}Wntk r0tYnX||}||=||fS(uD.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty. (unextuiteru StopIterationuKeyError(uselfukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupopitems   uMutableMapping.popitemc Cs-yx |jqWntk r(YnXdS(u,D.clear() -> None. Remove all items from D.N(upopitemuKeyError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclear%s  uMutableMapping.clearcOs%t|dkr0tdjt|n|sEtdn|d}t|dkrk|dnf}t|trxw|D]}|||| None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v iu8update() takes at most 2 positional arguments ({} given)u,update() takes at least 1 argument (0 given)iiukeysN(ulenu TypeErroruformatu isinstanceuMappinguhasattrukeysuitems(uargsukwdsuselfuotherukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuupdate-s"  " uMutableMapping.updatec Cs/y ||SWntk r*||| D.get(k,d), also set D[k]=d if k not in D(uKeyError(uselfukeyudefault((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu setdefaultGs   uMutableMapping.setdefaultN(u__name__u __module__u __qualname__u __slots__uabstractmethodu __setitem__u __delitem__uobjectu_MutableMapping__markerupopupopitemuclearuupdateuNoneu setdefault(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMutableMappings    cBsn|EeZdZdZfZeddZddZddZdd Z d d Z d d Z dS(uSequenceuAll the operations on a read-only sequence. Concrete subclasses must override __new__ or __init__, __getitem__, and __len__. cCs tdS(N(u IndexError(uselfuindex((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __getitem___suSequence.__getitem__c csFd}y#x||}|V|d7}q Wntk rAdSYnXdS(Nii(u IndexError(uselfuiuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__cs  uSequence.__iter__cCs%x|D]}||krdSqWdS(NTF(uTrueuFalse(uselfuvalueuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__ms  uSequence.__contains__ccs0x)ttt|D]}||VqWdS(N(ureversedurangeulen(uselfui((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __reversed__ssuSequence.__reversed__cCs7x*t|D]\}}||kr |Sq WtdS(u|S.index(value) -> integer -- return first index of value. Raises ValueError if the value is not present. N(u enumerateu ValueError(uselfuvalueuiuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuindexws uSequence.indexcstfdd|DS(uBS.count(value) -> integer -- return number of occurrences of valuec3s!|]}|krdVqdS(iN((u.0uv(uvalue(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su!Sequence.count..(usum(uselfuvalue((uvalueu4/opt/alt/python33/lib64/python3.3/collections/abc.pyucountsuSequence.countN( u__name__u __module__u __qualname__u__doc__u __slots__uabstractmethodu __getitem__u__iter__u __contains__u __reversed__uindexucount(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSequenceUs   cBs |EeZdZdZfZdS(u ByteStringuMThis unifies bytes and bytearray. XXX Should add all their methods. N(u__name__u __module__u __qualname__u__doc__u __slots__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ByteStringscBs|EeZdZfZeddZeddZeddZddZd d Z d d Z d dZ dddZ ddZ ddZdS(uMutableSequencecCs tdS(N(u IndexError(uselfuindexuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __setitem__suMutableSequence.__setitem__cCs tdS(N(u IndexError(uselfuindex((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __delitem__suMutableSequence.__delitem__cCs tdS(u3S.insert(index, value) -- insert value before indexN(u IndexError(uselfuindexuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuinsertsuMutableSequence.insertcCs|jt||dS(u:S.append(value) -- append value to the end of the sequenceN(uinsertulen(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuappendsuMutableSequence.appendc Cs-yx |jqWntk r(YnXdS(u,S.clear() -> None -- remove all items from SN(upopu IndexError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclears  uMutableSequence.clearcCsXt|}xEt|dD]3}|||d||||<|||d item -- remove and return item at index (default last). Raise IndexError if list is empty or index is out of range. ((uselfuindexuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupops uMutableSequence.popcCs||j|=dS(uvS.remove(value) -- remove first occurrence of value. Raise ValueError if the value is not present. N(uindex(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuremovesuMutableSequence.removecCs|j||S(N(uextend(uselfuvalues((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iadd__s uMutableSequence.__iadd__Ni(u__name__u __module__u __qualname__u __slots__uabstractmethodu __setitem__u __delitem__uinsertuappenduclearureverseuextendupopuremoveu__iadd__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMutableSequences      (9u__doc__uabcuABCMetauabstractmethodusysu__all__utypeuiterubytes_iteratoru bytearrayubytearray_iteratorukeysudict_keyiteratoruvaluesudict_valueiteratoruitemsudict_itemiteratoru list_iteratorureversedulist_reverseiteratorurangeurange_iteratorusetu set_iteratoru str_iteratorutuple_iteratoruzipu zip_iteratoru dict_keysu dict_valuesu dict_itemsu__dict__u mappingproxyuHashableuIterableuIteratoruregisteruSizedu ContaineruCallableuSetu frozensetu MutableSetuMappingu MappingViewuKeysViewu ItemsViewu ValuesViewuMutableMappingudictuSequenceutupleustru ByteStringubytesuMutableSequenceulist(((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyus                 y O 3     [ /     A PK!ݿ__pycache__/abc.cpython-33.pycnu[ fJc@sdZddlmZmZddlZdddddd d d d d dddddddgZeedZeee Z eeij Z eeij ZeeijZeegZeeegZeeedZeeeZeedZeefZeeeZeij Zeij ZeijZeejZ GddddeZ!GddddeZ"Gddde"Z#e#j$ee#j$e e#j$e e#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$ee#j$eGddddeZ%GddddeZ&Gdd d deZ'Gdd d e%e"e&Z(e(j$e)Gdd d e(Z*e*j$eGd d d e%e"e&Z+e+j$e Gd!dde%Z,Gd"dde,e(Z-e-j$eGd#dde,e(Z.e.j$eGd$dde,Z/e/j$eGd%d d e+Z0e0j$e1Gd&dde%e"e&Z2e2j$e3e2j$e4e2j$eGd'dde2Z5e5j$e6e5j$e Gd(dde2Z7e7j$e8e7j$e dS()ujAbstract Base Classes (ABCs) for collections, according to PEP 3119. Unit tests are in test_collections. i(uABCMetauabstractmethodNuHashableuIterableuIteratoruSizedu ContaineruCallableuSetu MutableSetuMappinguMutableMappingu MappingViewuKeysViewu ItemsViewu ValuesViewuSequenceuMutableSequenceu ByteStringsucBs>|EeZdZfZeddZeddZdS(uHashablecCsdS(Ni((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__hash__7suHashable.__hash__cCsK|tkrGx8|jD]*}d|jkr|jdr<dSPqqWntS(Nu__hash__T(uHashableu__mro__u__dict__uTrueuNotImplemented(uclsuCuB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__;s   uHashable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__hash__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuHashable3su metaclasscBs>|EeZdZfZeddZeddZdS(uIterableccsdS(N((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__JsuIterable.__iter__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__iter__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu Rsu,Iterable.__subclasshook__..T(uIterableuanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__Os uIterable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__iter__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuIterableFscBsJ|EeZdZfZeddZddZeddZdS(uIteratorcCs tdS(uKReturn the next item from the iterator. When exhausted, raise StopIterationN(u StopIteration(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__next__[suIterator.__next__cCs|S(N((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__`suIterator.__iter__cCsO|tkrKtdd|jDrKtdd|jDrKdSntS(Ncss|]}d|jkVqdS(u__next__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu fsu,Iterator.__subclasshook__..css|]}d|jkVqdS(u__iter__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu gsT(uIteratoruanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__cs  uIterator.__subclasshook__N( u__name__u __module__u __qualname__u __slots__uabstractmethodu__next__u__iter__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuIteratorWs cBs>|EeZdZfZeddZeddZdS(uSizedcCsdS(Ni((uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__len__}su Sized.__len__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__len__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su)Sized.__subclasshook__..T(uSizeduanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uSized.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__len__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSizedyscBs>|EeZdZfZeddZeddZdS(u ContainercCsdS(NF(uFalse(uselfux((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suContainer.__contains__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u __contains__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su-Container.__subclasshook__..T(u Containeruanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uContainer.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu __contains__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ContainerscBs>|EeZdZfZeddZeddZdS(uCallablecOsdS(NF(uFalse(uselfuargsukwds((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__call__suCallable.__call__cCs3|tkr/tdd|jDr/dSntS(Ncss|]}d|jkVqdS(u__call__N(u__dict__(u.0uB((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su,Callable.__subclasshook__..T(uCallableuanyu__mro__uTrueuNotImplemented(uclsuC((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__subclasshook__s uCallable.__subclasshook__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu__call__u classmethodu__subclasshook__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuCallablescBs|EeZdZdZfZddZddZddZdd Zd d Z d d Z e ddZ ddZ ddZddZddZddZddZdS(uSetuhA set is a finite, iterable container. This class provides concrete generic implementations of all methods except for __contains__, __iter__ and __len__. To override the comparisons (presumably for speed, as the semantics are fixed), all you have to do is redefine __le__ and then the other operations will automatically follow suit. cCsTt|tstSt|t|kr/dSx|D]}||kr6dSq6WdS(NFT(u isinstanceuSetuNotImplementedulenuFalseuTrue(uselfuotheruelem((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__le__s  u Set.__le__cCs8t|tstSt|t|ko7|j|S(N(u isinstanceuSetuNotImplementedulenu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__lt__su Set.__lt__cCs t|tstS|j|S(N(u isinstanceuSetuNotImplementedu__lt__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__gt__su Set.__gt__cCs t|tstS|j|S(N(u isinstanceuSetuNotImplementedu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ge__su Set.__ge__cCs8t|tstSt|t|ko7|j|S(N(u isinstanceuSetuNotImplementedulenu__le__(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__eq__su Set.__eq__cCs ||k S(N((uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ne__su Set.__ne__cCs ||S(uConstruct an instance of the class from any iterable input. Must override this method if the class constructor signature does not accept an iterable for an input. ((uclsuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuSet._from_iterablecs3t|tstSjfdd|DS(Nc3s!|]}|kr|VqdS(N((u.0uvalue(uself(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__and__..(u isinstanceuIterableuNotImplementedu_from_iterable(uselfuother((uselfu4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__and__su Set.__and__cCs%x|D]}||krdSqWdS(u1Return True if two sets have a null intersection.FT(uFalseuTrue(uselfuotheruvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu isdisjoints  uSet.isdisjointcCs9t|tstSdd||fD}|j|S(Ncss"|]}|D] }|Vq qdS(N((u.0usue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__or__..(u isinstanceuIterableuNotImplementedu_from_iterable(uselfuotheruchain((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__or__su Set.__or__csTtts4tts"tS|jn|jfdd|DS(Nc3s!|]}|kr|VqdS(N((u.0uvalue(uother(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu suSet.__sub__..(u isinstanceuSetuIterableuNotImplementedu_from_iterable(uselfuother((uotheru4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__sub__s u Set.__sub__cCsDt|ts4t|ts"tS|j|}n||||BS(N(u isinstanceuSetuIterableuNotImplementedu_from_iterable(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__xor__s u Set.__xor__cCstj}d|d}t|}d|d}||M}x>|D]6}t|}|||d>AdAdN}||M}qBW|dd}||M}||kr||d8}n|d krd }n|S( u+Compute the hash value of a set. Note that we don't define __hash__: not all sets are hashable. But if you define a hashable set type, its __hash__ should call this function. This must be compatible __eq__. All sets ought to compare equal if they contain the same elements, regardless of how they are implemented, and regardless of the order of the elements; so there's not much freedom for __eq__ or __hash__. We match the algorithm used by the built-in frozenset type. iiiMriiM[l4~2i i6i8#i(usysumaxsizeulenuhash(uselfuMAXuMASKunuhuxuhx((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_hashs          u Set._hashN(u__name__u __module__u __qualname__u__doc__u __slots__u__le__u__lt__u__gt__u__ge__u__eq__u__ne__u classmethodu_from_iterableu__and__u isdisjointu__or__u__sub__u__xor__u_hash(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSets           cBs|EeZdZdZfZeddZeddZddZdd Z d d Z d d Z ddZ ddZ ddZdS(u MutableSetuA mutable set is a finite, iterable container. This class provides concrete generic implementations of all methods except for __contains__, __iter__, __len__, add(), and discard(). To override the comparisons (presumably for speed, as the semantics are fixed), all you have to do is redefine __le__ and then the other operations will automatically follow suit. cCs tdS(uAdd an element.N(uNotImplementedError(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuadd6suMutableSet.addcCs tdS(u8Remove an element. Do not raise an exception if absent.N(uNotImplementedError(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyudiscard;suMutableSet.discardcCs,||krt|n|j|dS(u5Remove an element. If not a member, raise a KeyError.N(uKeyErrorudiscard(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuremove@s uMutableSet.removec CsHt|}yt|}Wntk r6tYnX|j||S(u2Return the popped value. Raise KeyError if empty.(uiterunextu StopIterationuKeyErrorudiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupopFs    uMutableSet.popc Cs-yx |jqWntk r(YnXdS(u6This is slow (creates N new iterators!) but effective.N(upopuKeyError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclearPs  uMutableSet.clearcCs"x|D]}|j|qW|S(N(uadd(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ior__Xs uMutableSet.__ior__cCs&x||D]}|j|q W|S(N(udiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iand__]suMutableSet.__iand__cCsx||kr|jn[t|ts:|j|}nx7|D]/}||krc|j|qA|j|qAW|S(N(uclearu isinstanceuSetu_from_iterableudiscarduadd(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ixor__bs    uMutableSet.__ixor__cCs;||kr|jnx|D]}|j|q W|S(N(uclearudiscard(uselfuituvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__isub__os    uMutableSet.__isub__N(u__name__u __module__u __qualname__u__doc__u __slots__uabstractmethoduaddudiscarduremoveupopuclearu__ior__u__iand__u__ixor__u__isub__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu MutableSet(s      cBs|EeZdZfZeddZdddZddZddZ d d Z d d Z d dZ ddZ dS(uMappingcCs tdS(N(uKeyError(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __getitem__suMapping.__getitem__c Cs)y ||SWntk r$|SYnXdS(u<D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.N(uKeyError(uselfukeyudefault((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyugets  u Mapping.getc Cs-y ||Wntk r$dSYnXdSdS(NFT(uKeyErroruFalseuTrue(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__s    uMapping.__contains__cCs t|S(u:D.keys() -> a set-like object providing a view on D's keys(uKeysView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyukeyssu Mapping.keyscCs t|S(u<D.items() -> a set-like object providing a view on D's items(u ItemsView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuitemssu Mapping.itemscCs t|S(u6D.values() -> an object providing a view on D's values(u ValuesView(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuvaluessuMapping.valuescCs5t|tstSt|jt|jkS(N(u isinstanceuMappinguNotImplementedudictuitems(uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__eq__suMapping.__eq__cCs ||k S(N((uselfuother((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__ne__suMapping.__ne__N(u__name__u __module__u __qualname__u __slots__uabstractmethodu __getitem__uNoneugetu __contains__ukeysuitemsuvaluesu__eq__u__ne__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMapping}s      cBs8|EeZdZddZddZddZdS(u MappingViewcCs ||_dS(N(u_mapping(uselfumapping((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__init__suMappingView.__init__cCs t|jS(N(ulenu_mapping(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__len__suMappingView.__len__cCs dj|S(Nu&{0.__class__.__name__}({0._mapping!r})(uformat(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__repr__suMappingView.__repr__N(u__name__u __module__u __qualname__u__init__u__len__u__repr__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu MappingViews  cBs>|EeZdZeddZddZddZdS(uKeysViewcCs t|S(N(uset(uselfuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuKeysView._from_iterablecCs ||jkS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suKeysView.__contains__ccsx|jD] }|Vq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suKeysView.__iter__N(u__name__u __module__u __qualname__u classmethodu_from_iterableu __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuKeysViews cBs>|EeZdZeddZddZddZdS(u ItemsViewcCs t|S(N(uset(uselfuit((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu_from_iterablesuItemsView._from_iterablec CsD|\}}y|j|}Wntk r5dSYn X||kSdS(NF(u_mappinguKeyErroruFalse(uselfuitemukeyuvalueuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__s    uItemsView.__contains__ccs*x#|jD]}||j|fVq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suItemsView.__iter__N(u__name__u __module__u __qualname__u classmethodu_from_iterableu __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ItemsViews cBs,|EeZdZddZddZdS(u ValuesViewcCs/x(|jD]}||j|kr dSq WdS(NTF(u_mappinguTrueuFalse(uselfuvalueukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__suValuesView.__contains__ccs$x|jD]}|j|Vq WdS(N(u_mapping(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__suValuesView.__iter__N(u__name__u __module__u __qualname__u __contains__u__iter__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ValuesViews cBs|EeZdZfZeddZeddZeZeddZ ddZ d d Z d d Z dd dZdS(uMutableMappingcCs tdS(N(uKeyError(uselfukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __setitem__suMutableMapping.__setitem__cCs tdS(N(uKeyError(uselfukey((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __delitem__suMutableMapping.__delitem__c CsKy||}Wn+tk r;||jkr3n|SYn X||=|SdS(uD.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. N(uKeyErroru_MutableMapping__marker(uselfukeyudefaultuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupop s  uMutableMapping.popc CsLytt|}Wntk r0tYnX||}||=||fS(uD.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty. (unextuiteru StopIterationuKeyError(uselfukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupopitems   uMutableMapping.popitemc Cs-yx |jqWntk r(YnXdS(u,D.clear() -> None. Remove all items from D.N(upopitemuKeyError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclear%s  uMutableMapping.clearcOs%t|dkr0tdjt|n|sEtdn|d}t|dkrk|dnf}t|trxw|D]}|||| None. Update D from mapping/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v iu8update() takes at most 2 positional arguments ({} given)u,update() takes at least 1 argument (0 given)iiukeysN(ulenu TypeErroruformatu isinstanceuMappinguhasattrukeysuitems(uargsukwdsuselfuotherukeyuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuupdate-s"  " uMutableMapping.updatec Cs/y ||SWntk r*||| D.get(k,d), also set D[k]=d if k not in D(uKeyError(uselfukeyudefault((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu setdefaultGs   uMutableMapping.setdefaultN(u__name__u __module__u __qualname__u __slots__uabstractmethodu __setitem__u __delitem__uobjectu_MutableMapping__markerupopupopitemuclearuupdateuNoneu setdefault(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMutableMappings    cBsn|EeZdZdZfZeddZddZddZdd Z d d Z d d Z dS(uSequenceuAll the operations on a read-only sequence. Concrete subclasses must override __new__ or __init__, __getitem__, and __len__. cCs tdS(N(u IndexError(uselfuindex((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __getitem___suSequence.__getitem__c csFd}y#x||}|V|d7}q Wntk rAdSYnXdS(Nii(u IndexError(uselfuiuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iter__cs  uSequence.__iter__cCs%x|D]}||krdSqWdS(NTF(uTrueuFalse(uselfuvalueuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __contains__ms  uSequence.__contains__ccs0x)ttt|D]}||VqWdS(N(ureversedurangeulen(uselfui((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __reversed__ssuSequence.__reversed__cCs7x*t|D]\}}||kr |Sq WtdS(u|S.index(value) -> integer -- return first index of value. Raises ValueError if the value is not present. N(u enumerateu ValueError(uselfuvalueuiuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuindexws uSequence.indexcstfdd|DS(uBS.count(value) -> integer -- return number of occurrences of valuec3s!|]}|krdVqdS(iN((u.0uv(uvalue(u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu su!Sequence.count..(usum(uselfuvalue((uvalueu4/opt/alt/python33/lib64/python3.3/collections/abc.pyucountsuSequence.countN( u__name__u __module__u __qualname__u__doc__u __slots__uabstractmethodu __getitem__u__iter__u __contains__u __reversed__uindexucount(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuSequenceUs   cBs |EeZdZdZfZdS(u ByteStringuMThis unifies bytes and bytearray. XXX Should add all their methods. N(u__name__u __module__u __qualname__u__doc__u __slots__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu ByteStringscBs|EeZdZfZeddZeddZeddZddZd d Z d d Z d dZ dddZ ddZ ddZdS(uMutableSequencecCs tdS(N(u IndexError(uselfuindexuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __setitem__suMutableSequence.__setitem__cCs tdS(N(u IndexError(uselfuindex((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu __delitem__suMutableSequence.__delitem__cCs tdS(u3S.insert(index, value) -- insert value before indexN(u IndexError(uselfuindexuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuinsertsuMutableSequence.insertcCs|jt||dS(u:S.append(value) -- append value to the end of the sequenceN(uinsertulen(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuappendsuMutableSequence.appendc Cs-yx |jqWntk r(YnXdS(u,S.clear() -> None -- remove all items from SN(upopu IndexError(uself((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuclears  uMutableSequence.clearcCsXt|}xEt|dD]3}|||d||||<|||d item -- remove and return item at index (default last). Raise IndexError if list is empty or index is out of range. ((uselfuindexuv((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyupops uMutableSequence.popcCs||j|=dS(uvS.remove(value) -- remove first occurrence of value. Raise ValueError if the value is not present. N(uindex(uselfuvalue((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuremovesuMutableSequence.removecCs|j||S(N(uextend(uselfuvalues((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyu__iadd__s uMutableSequence.__iadd__Ni(u__name__u __module__u __qualname__u __slots__uabstractmethodu __setitem__u __delitem__uinsertuappenduclearureverseuextendupopuremoveu__iadd__(u __locals__((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyuMutableSequences      (9u__doc__uabcuABCMetauabstractmethodusysu__all__utypeuiterubytes_iteratoru bytearrayubytearray_iteratorukeysudict_keyiteratoruvaluesudict_valueiteratoruitemsudict_itemiteratoru list_iteratorureversedulist_reverseiteratorurangeurange_iteratorusetu set_iteratoru str_iteratorutuple_iteratoruzipu zip_iteratoru dict_keysu dict_valuesu dict_itemsu__dict__u mappingproxyuHashableuIterableuIteratoruregisteruSizedu ContaineruCallableuSetu frozensetu MutableSetuMappingu MappingViewuKeysViewu ItemsViewu ValuesViewuMutableMappingudictuSequenceutupleustru ByteStringubytesuMutableSequenceulist(((u4/opt/alt/python33/lib64/python3.3/collections/abc.pyus                 y O 3     [ /     A PK! / __main__.pynu[################################################################################ ### Simple tests ################################################################################ # verify that instances can be pickled from collections import namedtuple from pickle import loads, dumps Point = namedtuple('Point', 'x, y', True) p = Point(x=10, y=20) assert p == loads(dumps(p)) # test and demonstrate ability to override methods class Point(namedtuple('Point', 'x y')): __slots__ = () @property def hypot(self): return (self.x ** 2 + self.y ** 2) ** 0.5 def __str__(self): return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot) for p in Point(3, 4), Point(14, 5/7.): print (p) class Point(namedtuple('Point', 'x y')): 'Point class with optimized _make() and _replace() without error-checking' __slots__ = () _make = classmethod(tuple.__new__) def _replace(self, _map=map, **kwds): return self._make(_map(kwds.get, ('x', 'y'), self)) print(Point(11, 22)._replace(x=100)) Point3D = namedtuple('Point3D', Point._fields + ('z',)) print(Point3D.__doc__) import doctest, collections TestResults = namedtuple('TestResults', 'failed attempted') print(TestResults(*doctest.testmod(collections))) PK!M铎#__pycache__/__init__.cpython-36.pycnu[3  f$@sdZddddddddd g Zd d lTd d lZeej7Zd d lmZmZd dlm Z d d l Z d d l Zd dlmZd dlmZmZmZd dlmZyd dlmZWnek rYn Xej eyd dlm!Z!Wnek rYnXGddde"Z#Gddde$Z%Gddde&Z'Gddde(Z)Gddde*Z+yd dlm+Z+Wnek rXYnXdZ,dZ-d Z.d!d!d d"d#dZ/d$d%Z0yd d&lm0Z0Wnek rYnXGd'dde*Z1Gd(d d e2Z3Gd)dde2Z4Gd*ddeZ5Gd+dde6Z7d S),a?This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * ChainMap dict-like class for creating a single view of multiple mappings * Counter dict subclass for counting hashable objects * OrderedDict dict subclass that remembers the order entries were added * defaultdict dict subclass that calls a factory function to supply missing values * UserDict wrapper around dictionary objects for easier dict subclassing * UserList wrapper around list objects for easier list subclassing * UserString wrapper around string objects for easier string subclassing deque defaultdict namedtupleUserDictUserList UserStringCounter OrderedDictChainMap)*N) itemgettereq) iskeyword)proxy)repeatchainstarmap)recursive_repr)r)rc@seZdZddZdS)_OrderedDictKeysViewccst|jEdHdS)N)reversed_mapping)selfr9/opt/alt/python36/lib64/python3.6/collections/__init__.py __reversed__5sz!_OrderedDictKeysView.__reversed__N)__name__ __module__ __qualname__rrrrrr3src@seZdZddZdS)_OrderedDictItemsViewccs(x"t|jD]}||j|fVq WdS)N)rr)rkeyrrrr:sz"_OrderedDictItemsView.__reversed__N)rrrrrrrrr8src@seZdZddZdS)_OrderedDictValuesViewccs$xt|jD]}|j|Vq WdS)N)rr)rrrrrr@sz#_OrderedDictValuesView.__reversed__N)rrrrrrrrr >sr c@seZdZdZdS)_Linkprevnextr __weakref__N)r"r#rr$)rrr __slots__rrrrr!Dsr!c@seZdZdZddZejeefddZej fddZ dd Z d d Z d d Z d*ddZ d+ddZddZejZZddZddZddZejZeZefddZd,ddZed d!Zd"d#Zd$d%Zed-d&d'Z d(d)Z!dS).rz)Dictionary that remembers insertion orderc Os|s td|^}}t|dkr0tdt|y |jWn>tk rxt|_t|j|_}||_|_i|_ YnX|j ||dS)zInitialize an ordered dictionary. The signature is the same as regular dictionaries. Keyword argument order is preserved. z?descriptor '__init__' of 'OrderedDict' object needs an argumentz$expected at most 1 arguments, got %dN) TypeErrorlen_OrderedDict__rootAttributeErrorr!_OrderedDict__hardroot_proxyr"r#_OrderedDict__map_OrderedDict__update)argskwdsrrootrrr__init__Vs    zOrderedDict.__init__c CsZ||krJ||j|<}|j}|j}||||_|_|_||_|||_||||dS)z!od.__setitem__(i, y) <==> od[i]=yN)r-r)r"r#r) rrvalueZ dict_setitemrZLinklinkr1lastrrr __setitem__is zOrderedDict.__setitem__cCs>||||jj|}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r-popr"r#)rrZ dict_delitemr4 link_prev link_nextrrr __delitem__ws  zOrderedDict.__delitem__ccs,|j}|j}x||k r&|jV|j}qWdS)zod.__iter__() <==> iter(od)N)r)r#r)rr1currrrr__iter__s  zOrderedDict.__iter__ccs,|j}|j}x||k r&|jV|j}qWdS)z#od.__reversed__() <==> reversed(od)N)r)r"r)rr1r;rrrrs  zOrderedDict.__reversed__cCs*|j}||_|_|jjtj|dS)z.od.clear() -> None. Remove all items from od.N)r)r"r#r-cleardict)rr1rrrr=s  zOrderedDict.clearTcCsj|s td|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=tj||}||fS)zRemove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order if last is true or FIFO order if false. zdictionary is empty)KeyErrorr)r"r#rr-r>r7)rr5r1r4r8r9rr3rrrpopitems  zOrderedDict.popitemc Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)zMove an existing element to the end (or beginning if last==False). Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key). N)r-r"r#r)) rrr5r4r8r9Z soft_linkr1firstrrr move_to_ends$ zOrderedDict.move_to_endcCsVtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S)Nr&)_sys getsizeofr(__dict__r-r+r))rZsizeofnsizerrr __sizeof__s  zOrderedDict.__sizeof__cCst|S)z:D.keys() -> a set-like object providing a view on D's keys)r)rrrrkeysszOrderedDict.keyscCst|S)z a set-like object providing a view on D's items)r)rrrritemsszOrderedDict.itemscCst|S)z6D.values() -> an object providing a view on D's values)r )rrrrvaluesszOrderedDict.valuescCs0||kr||}||=|S||jkr,t||S)zod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. )_OrderedDict__markerr?)rrdefaultresultrrrr7s zOrderedDict.popNcCs||kr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr)rrrNrrr setdefaultszOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|jfS)zod.__repr__() <==> repr(od)z%s()z%s(%r)) __class__rlistrK)rrrr__repr__szOrderedDict.__repr__cCsHt|j}xttD]}|j|dqW|jf|p8ddt|jfS)z%Return state information for picklingN)varscopyrr7rQiterrK)rZ inst_dictkrrr __reduce__s zOrderedDict.__reduce__cCs |j|S)z!od.copy() -> a shallow copy of od)rQ)rrrrrU szOrderedDict.copycCs |}x|D] }|||<q W|S)zOD.fromkeys(S[, v]) -> New ordered dictionary with keys from S. If not specified, the value defaults to None. r)clsiterabler3rrrrrfromkeyss  zOrderedDict.fromkeyscCs2t|tr&tj||o$ttt||Stj||S)zod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. ) isinstancerr>__eq__allmap_eq)rotherrrrr]s zOrderedDict.__eq__)T)T)N)N)"rrr__doc__r2r>r6r,r!r:r<rr=r@rBrIMutableMappingupdater.rJrKrL__ne__objectrMr7rP_recursive_reprrSrXrU classmethodr[r]rrrrrGs0          )rafrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values.' return OrderedDict(zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) {field_defs} z {name}=%rzW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') F)verboserenamemodulec Cst|tr|jddj}ttt|}t|}|rt}xNt|D]B\}}|j spt |sp|j dsp||kr|d|||<|j |qDWxN|g|D]@}t |tk rt d|jstd|t |rtd|qWt}xJ|D]B}|j do| rtd|||krtd ||j |qWtj|t|t|tt|jd d d dd jdd|Ddjddt|Dd}td|d} t|| | |} || _|rt| j|dkrytjd jjdd}Wnttfk rYnX|dk r || _| S)aCReturns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) , _z_%dz*Type names and field names must be stringsz8Type names and field names must be valid identifiers: %rz2Type names and field names cannot be a keyword: %rz/Field names cannot start with an underscore: %rz$Encountered duplicate field name: %r'r&z, css|]}tj|dVqdS))nameN)_repr_templateformat).0rqrrr sznamedtuple.. css |]\}}tj||dVqdS))indexrqN)_field_templaters)rtrwrqrrrrus)typename field_names num_fieldsarg_listrepr_fmt field_defsz namedtuple_%s)rNr__main__)r\strreplacesplitrRr_set enumerate isidentifier _iskeyword startswithaddtyper' ValueError_class_templaterstupler(reprjoinr>exec_sourceprintrD _getframe f_globalsgetr*r) ryrzrirjrkseenrwrqclass_definition namespacerOrrrresj               cCs*|j}x|D]}||dd||<q WdS)z!Tally elements from the iterable.r r&N)r)mappingrZZ mapping_getelemrrr_count_elementss r)rcseZdZdZfddZddZd/ddZd d Zed0d d Z fd dZ ddZ ddZ ddZ fddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.ZZS)1raDict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values. >>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] csN|s td|^}}t|dkr0tdt|tt|j|j||dS)a Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args z;descriptor '__init__' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dN)r'r(superrr2rd)r/r0r)rQrrr2s  zCounter.__init__cCsdS)z1The count of elements not in the Counter is zero.r r)rrrrr __missing__szCounter.__missing__NcCs6|dkrt|jtdddStj||jtddS)zList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abcdeabcdabcaba').most_common(3) [('a', 5), ('b', 4), ('c', 3)] Nr&T)rreverse)r)sortedrK _itemgetter_heapqnlargest)rrGrrr most_commons zCounter.most_commoncCstjtt|jS)aIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> product = 1 >>> for factor in prime_factors.elements(): # loop over factors ... product *= factor # and multiply them >>> product 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. )_chain from_iterable_starmap_repeatrK)rrrrelements+szCounter.elementscCs tddS)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)rYrZvrrrr[CszCounter.fromkeyscs|s td|^}}t|dkr0tdt||r<|dnd}|dk rt|tr|r|j}x8|jD]\}}|||d||<qfWqtt|j|n t |||r|j|dS)aLike dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 z9descriptor 'update' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr N) r'r(r\MappingrrKrrrdr)r/r0rrZself_getrcount)rQrrrdJs    zCounter.updatecOs|s td|^}}t|dkr0tdt||r<|dnd}|dk r|j}t|trxH|jD]\}}||d|||<qbWn x|D]}||dd||<qW|r|j|dS)aLike dict.update() but subtracts counts instead of replacing them. Counts can be reduced below zero. Both the inputs and outputs are allowed to contain zero and negative counts. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 z;descriptor 'subtract' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr N)r'r(rr\rrKsubtract)r/r0rrZrrrrrrrrs   zCounter.subtractcCs |j|S)zReturn a shallow copy.)rQ)rrrrrUsz Counter.copycCs|jt|ffS)N)rQr>)rrrrrXszCounter.__reduce__cs||krtj|dS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)rr:)rr)rQrrr:szCounter.__delitem__c Cs`|sd|jjSy&djtdj|j}d|jj|fStk rZdj|jjt|SXdS)Nz%s()z, z%r: %rz%s({%s})z {0}({1!r})) rQrrr___mod__rr'rsr>)rrKrrrrSs zCounter.__repr__cCsxt|tstSt}x0|jD]$\}}|||}|dkr|||<qWx,|jD] \}}||krP|dkrP|||<qPW|S)zAdd counts from two counters. >>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) r )r\rNotImplementedrK)rrarOrrnewcountrrr__add__s    zCounter.__add__cCs|t|tstSt}x0|jD]$\}}|||}|dkr|||<qWx0|jD]$\}}||krP|dkrPd|||<qPW|S)z Subtract count, but keep only results with positive counts. >>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) r )r\rrrK)rrarOrrrrrr__sub__s   zCounter.__sub__cCst|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qWx,|jD] \}}||kr\|dkr\|||<q\W|S)zUnion is the maximum of value in either of the input counters. >>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) r )r\rrrK)rrarOrr other_countrrrr__or__s   zCounter.__or__cCsVt|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qW|S)z Intersection is the minimum of corresponding counts. >>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) r )r\rrrK)rrarOrrrrrrr__and__s  zCounter.__and__cCs0t}x$|jD]\}}|dkr|||<qW|S)zEAdds an empty counter, effectively stripping negative and zero countsr )rrK)rrOrrrrr__pos__s  zCounter.__pos__cCs4t}x(|jD]\}}|dkrd|||<qW|S)z{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. r )rrK)rrOrrrrr__neg__s zCounter.__neg__cCs*dd|jD}x|D] }||=qW|S)z?Internal method to strip elements with a negative or zero countcSsg|]\}}|dks|qS)r r)rtrrrrr sz*Counter._keep_positive..)rK)r nonpositiverrrr_keep_positives  zCounter._keep_positivecCs.x$|jD]\}}|||7<q W|jS)zInplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) )rKr)rrarrrrr__iadd__s zCounter.__iadd__cCs.x$|jD]\}}|||8<q W|jS)zInplace subtract counter, but keep only results with positive counts. >>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) )rKr)rrarrrrr__isub__%s zCounter.__isub__cCs6x,|jD] \}}||}||kr |||<q W|jS)zInplace union is the maximum of value from either counter. >>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) )rKr)rrarrrrrr__ior__2s  zCounter.__ior__cCs6x,|jD] \}}||}||kr |||<q W|jS)zInplace intersection is the minimum of corresponding counts. >>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) )rKr)rrarrrrrr__iand__As  zCounter.__iand__)N)N)rrrrbr2rrrrhr[rdrrUrXr:rSrrrrrrrrrrr __classcell__rr)rQrrs0+    ("    c@seZdZdZddZddZddZd'd d Zd d Zd dZ ddZ ddZ e ddZ eddZddZeZd(ddZeddZddZdd Zd!d"Zd#d$Zd%d&ZdS))r a A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can be accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. cGst|p ig|_dS)zInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N)rRmaps)rrrrrr2cszChainMap.__init__cCs t|dS)N)r?)rrrrrrjszChainMap.__missing__c Cs8x,|jD]"}y||Stk r(YqXqW|j|S)N)rr?r)rrrrrr __getitem__ms   zChainMap.__getitem__NcCs||kr||S|S)Nr)rrrNrrrrusz ChainMap.getcCsttj|jS)N)r(runionr)rrrr__len__xszChainMap.__len__cCsttj|jS)N)rVrrr)rrrrr<{szChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr)rtm)rrrrusz(ChainMap.__contains__..)anyr)rrr)rr __contains__~szChainMap.__contains__cCs t|jS)N)rr)rrrr__bool__szChainMap.__bool__cCsdj|djtt|jS)Nz{0.__class__.__name__}({1})z, )rsrr_rr)rrrrrSszChainMap.__repr__cGs|tj|f|S)z?Create a ChainMap with a single dict created from the iterable.)r>r[)rYrZr/rrrr[szChainMap.fromkeyscCs$|j|jdjf|jddS)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r r&N)rQrrU)rrrrrUsz ChainMap.copycCs|dkr i}|j|f|jS)zyNew ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. N)rQr)rrrrr new_childszChainMap.new_childcCs|j|jddS)zNew ChainMap from maps[1:].r&N)rQr)rrrrparentsszChainMap.parentscCs||jd|<dS)Nr )r)rrr3rrrr6szChainMap.__setitem__c Cs8y|jd|=Wn"tk r2tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr?rs)rrrrrr:szChainMap.__delitem__c Cs0y|jdjStk r*tdYnXdS)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r z#No keys found in the first mapping.N)rr@r?)rrrrr@szChainMap.popitemc Gs>y|jdj|f|Stk r8tdj|YnXdS)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r z(Key not found in the first mapping: {!r}N)rr7r?rs)rrr/rrrr7sz ChainMap.popcCs|jdjdS)z'Clear maps[0], leaving maps[1:] intact.r N)rr=)rrrrr=szChainMap.clear)N)N)rrrrbr2rrrrr<rrrgrSrhr[rU__copy__rpropertyrr6r:r@r7r=rrrrr Us(     c@sbeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ e dddZ dS)rcOs|s td|^}}t|dkr0tdt||r>|d}n0d|krj|jd}ddl}|jdtddnd}i|_|dk r|j|t|r|j|dS) Nzz0Passing 'dict' as keyword argument is deprecatedrC) stacklevel)r'r(r7warningswarnDeprecationWarningdatard)r/kwargsrr>rrrrr2s$     zUserDict.__init__cCs t|jS)N)r(r)rrrrrszUserDict.__len__cCs:||jkr|j|St|jdr.|jj||St|dS)Nr)rhasattrrQrr?)rrrrrrs    zUserDict.__getitem__cCs||j|<dS)N)r)rritemrrrr6szUserDict.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserDict.__delitem__cCs t|jS)N)rVr)rrrrr<szUserDict.__iter__cCs ||jkS)N)r)rrrrrrszUserDict.__contains__cCs t|jS)N)rr)rrrrrSszUserDict.__repr__c CsR|jtkrt|jjSddl}|j}zi|_|j|}Wd||_X|j||S)Nr )rQrrrUrd)rrUrcrrrrUs  z UserDict.copyNcCs |}x|D] }|||<q W|S)Nr)rYrZr3drrrrr[s  zUserDict.fromkeys)N)rrrr2rrr6r:r<rrSrUrhr[rrrrrs c@seZdZdZd>ddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$ZeZd%d&Zd'd(Zd)d*Zd@d,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Z dszUserList.indexcCs|jjdS)N)rr)rrrrr?szUserList.reversecOs|jj||dS)N)rsort)rr/r0rrrr@sz UserList.sortcCs*t|tr|jj|jn |jj|dS)N)r\rrextend)rrarrrrAs zUserList.extend)Nr)r)"rrrrbr2rSrrr]rrrrrrr6r:rrrr__rmul__rrrr7rr=rUrrwrrrrrrrrs>  c@s`eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&ZeZd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1ejfd2d3Zdd5d6Zd1ejfd7d8Z dd:d;Z!d1ejfdd?Z#d@dAZ$d1ejfdBdCZ%dDdEZ&dFdGZ'dHdIZ(dJdKZ)dLdMZ*dNdOZ+dPdQZ,dRdSZ-dTdUZ.dVdWZ/dXdYZ0dZd[Z1d\d]Z2d^d_Z3dd`daZ4e5j6Z6dbdcZ7ddedfZ8d1ejfdgdhZ9d1ejfdidjZ:dkdlZ;dmdnZddsdtZ?ddvdwZ@d1ejfdxdyZAddzd{ZBd|d}ZCd~dZDddZEddZFddZGd4S)rcCs<t|tr||_n&t|tr.|jdd|_n t||_dS)N)r\rrr)rseqrrrr2Ns   zUserString.__init__cCs t|jS)N)rr)rrrr__str__UszUserString.__str__cCs t|jS)N)rr)rrrrrSVszUserString.__repr__cCs t|jS)N)intr)rrrr__int__WszUserString.__int__cCs t|jS)N)floatr)rrrr __float__XszUserString.__float__cCs t|jS)N)complexr)rrrr __complex__YszUserString.__complex__cCs t|jS)N)hashr)rrrr__hash__ZszUserString.__hash__cCs|jddfS)N)r)rrrr__getnewargs__[szUserString.__getnewargs__cCs t|tr|j|jkS|j|kS)N)r\rr)rstringrrrr]^s  zUserString.__eq__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrbs  zUserString.__lt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrfs  zUserString.__le__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrjs  zUserString.__gt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrns  zUserString.__ge__cCst|tr|j}||jkS)N)r\rr)rcharrrrrss zUserString.__contains__cCs t|jS)N)r(r)rrrrrxszUserString.__len__cCs|j|j|S)N)rQr)rrwrrrryszUserString.__getitem__cCsJt|tr|j|j|jSt|tr6|j|j|S|j|jt|S)N)r\rrQrr)rrarrrrzs   zUserString.__add__cCs.t|tr|j||jS|jt||jS)N)r\rrQr)rrarrrrs zUserString.__radd__cCs|j|j|S)N)rQr)rrGrrrrszUserString.__mul__cCs|j|j|S)N)rQr)rr/rrrrszUserString.__mod__cCs|j|tS)N)rQr/)rrsrrr__rmod__szUserString.__rmod__cCs|j|jjS)N)rQr capitalize)rrrrrszUserString.capitalizecCs|j|jjS)N)rQrcasefold)rrrrrszUserString.casefoldcGs|j|jj|f|S)N)rQrcenter)rwidthr/rrrrszUserString.centerr cCs t|tr|j}|jj|||S)N)r\rrr)rsubstartendrrrrs zUserString.countNcCs>|r.|r|j|jj||S|j|jj|S|j|jjS)N)rQrencode)rencodingerrorsrrrrs zUserString.encodecCs|jj|||S)N)rendswith)rsuffixrrrrrrszUserString.endswithcCs|j|jj|S)N)rQr expandtabs)rtabsizerrrrszUserString.expandtabscCs t|tr|j}|jj|||S)N)r\rrfind)rrrrrrrrs zUserString.findcOs|jj||S)N)rrs)rr/r0rrrrsszUserString.formatcCs |jj|S)N)r format_map)rrrrrrszUserString.format_mapcCs|jj|||S)N)rrw)rrrrrrrrwszUserString.indexcCs |jjS)N)risalpha)rrrrrszUserString.isalphacCs |jjS)N)risalnum)rrrrrszUserString.isalnumcCs |jjS)N)r isdecimal)rrrrr szUserString.isdecimalcCs |jjS)N)risdigit)rrrrr szUserString.isdigitcCs |jjS)N)rr)rrrrrszUserString.isidentifiercCs |jjS)N)rislower)rrrrr szUserString.islowercCs |jjS)N)r isnumeric)rrrrr szUserString.isnumericcCs |jjS)N)r isprintable)rrrrr szUserString.isprintablecCs |jjS)N)risspace)rrrrrszUserString.isspacecCs |jjS)N)ristitle)rrrrrszUserString.istitlecCs |jjS)N)risupper)rrrrrszUserString.isuppercCs |jj|S)N)rr)rrrrrrszUserString.joincGs|j|jj|f|S)N)rQrljust)rrr/rrrrszUserString.ljustcCs|j|jjS)N)rQrlower)rrrrrszUserString.lowercCs|j|jj|S)N)rQrlstrip)rcharsrrrrszUserString.lstripcCs |jj|S)N)r partition)rseprrrrszUserString.partitionr&cCs6t|tr|j}t|tr |j}|j|jj|||S)N)r\rrrQr)roldnewmaxsplitrrrrs   zUserString.replacecCs t|tr|j}|jj|||S)N)r\rrrfind)rrrrrrrrs zUserString.rfindcCs|jj|||S)N)rrindex)rrrrrrrrszUserString.rindexcGs|j|jj|f|S)N)rQrrjust)rrr/rrrrszUserString.rjustcCs |jj|S)N)r rpartition)rrrrrrszUserString.rpartitioncCs|j|jj|S)N)rQrrstrip)rrrrrrszUserString.rstripcCs|jj||S)N)rr)rrrrrrrszUserString.splitcCs|jj||S)N)rrsplit)rrrrrrrszUserString.rsplitFcCs |jj|S)N)r splitlines)rkeependsrrrr szUserString.splitlinescCs|jj|||S)N)rr)rprefixrrrrrrszUserString.startswithcCs|j|jj|S)N)rQrstrip)rrrrrr#szUserString.stripcCs|j|jjS)N)rQrswapcase)rrrrr$szUserString.swapcasecCs|j|jjS)N)rQrtitle)rrrrr%szUserString.titlecGs|j|jj|S)N)rQr translate)rr/rrrr&szUserString.translatecCs|j|jjS)N)rQrupper)rrrrr'szUserString.uppercCs|j|jj|S)N)rQrzfill)rrrrrr(szUserString.zfill)NN)r)Nr)r)Nr)Nrr)Nr)F)N)Hrrrr2rrSrrrrrr]rrrrrrrrrrrrrrrrrDmaxsizerrrrrrsrrwrrr r rr r r rrrrrrrr maketransrrrrrrrrrr rr#r$r%r&r'r(rrrrrMs         )8rb__all___collections_abcoperatorr rr r`keywordrrsysrDheapqr_weakrefrr, itertoolsrrrrrrreprlibrrg _collectionsr ImportErrorMutableSequenceregisterrKeysViewr ItemsViewr ValuesViewr rfr!r>rrrrrxrrrrcr rrSequencerrrrrs`       `3blCIPK!;$__pycache__/abc.cpython-36.opt-1.pycnu[3  fD@sddlTddlmZdS))*)__all__N)_collections_abcrrr4/opt/alt/python36/lib64/python3.6/collections/abc.pysPK!>JQ/)__pycache__/__init__.cpython-36.opt-2.pycnu[3 2a$@sdddddddddg Zd d lTd d lZeej7Zd d lmZmZd d lmZ d d l Z d d l Z d dlmZd dlmZmZmZd dlmZyd dlmZWnek rYn Xejeyd dlm Z Wnek rYnXGddde!Z"Gddde#Z$Gddde%Z&Gddde'Z(Gddde)Z*yd dlm*Z*Wnek rTYnXdZ+dZ,dZ-d d d d!d"dZ.d#d$Z/yd d%lm/Z/Wnek rYnXGd&dde)Z0Gd'dde1Z2Gd(dde1Z3Gd)ddeZ4Gd*dde5Z6d S)+deque defaultdict namedtupleUserDictUserList UserStringCounter OrderedDictChainMap)*N) itemgettereq) iskeyword)proxy)repeatchainstarmap)recursive_repr)r)rc@seZdZddZdS)_OrderedDictKeysViewccst|jEdHdS)N)reversed_mapping)selfr-/opt/alt/python36/lib64/python3.6/__init__.py __reversed__5sz!_OrderedDictKeysView.__reversed__N)__name__ __module__ __qualname__rrrrrr3src@seZdZddZdS)_OrderedDictItemsViewccs(x"t|jD]}||j|fVq WdS)N)rr)rkeyrrrr:sz"_OrderedDictItemsView.__reversed__N)rrrrrrrrr8src@seZdZddZdS)_OrderedDictValuesViewccs$xt|jD]}|j|Vq WdS)N)rr)rrrrrr@sz#_OrderedDictValuesView.__reversed__N)rrrrrrrrr >sr c@seZdZdZdS)_Linkprevnextr __weakref__N)r"r#rr$)rrr __slots__rrrrr!Dsr!c@seZdZddZejeefddZejfddZddZ d d Z d d Z d)ddZ d*ddZ ddZejZZddZddZddZejZeZefddZd+ddZedd Zd!d"Zd#d$Zed,d%d&Zd'd(Z dS)-rc Os|s td|^}}t|dkr0tdt|y |jWn>tk rxt|_t|j|_}||_|_i|_ YnX|j ||dS)Nz?descriptor '__init__' of 'OrderedDict' object needs an argumentz$expected at most 1 arguments, got %d) TypeErrorlen_OrderedDict__rootAttributeErrorr!_OrderedDict__hardroot_proxyr"r#_OrderedDict__map_OrderedDict__update)argskwdsrrootrrr__init__Vs    zOrderedDict.__init__c CsZ||krJ||j|<}|j}|j}||||_|_|_||_|||_||||dS)N)r-r)r"r#r) rrvalueZ dict_setitemrZLinklinkr1lastrrr __setitem__is zOrderedDict.__setitem__cCs>||||jj|}|j}|j}||_||_d|_d|_dS)N)r-popr"r#)rrZ dict_delitemr4 link_prev link_nextrrr __delitem__ws  zOrderedDict.__delitem__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r)r#r)rr1currrrr__iter__s  zOrderedDict.__iter__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r)r"r)rr1r;rrrrs  zOrderedDict.__reversed__cCs*|j}||_|_|jjtj|dS)N)r)r"r#r-cleardict)rr1rrrr=s  zOrderedDict.clearTcCsj|s td|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=tj||}||fS)Nzdictionary is empty)KeyErrorr)r"r#rr-r>r7)rr5r1r4r8r9rr3rrrpopitems  zOrderedDict.popitemc Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)N)r-r"r#r)) rrr5r4r8r9Z soft_linkr1firstrrr move_to_ends$ zOrderedDict.move_to_endcCsVtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S)Nr&)_sys getsizeofr(__dict__r-r+r))rZsizeofnsizerrr __sizeof__s  zOrderedDict.__sizeof__cCst|S)N)r)rrrrkeysszOrderedDict.keyscCst|S)N)r)rrrritemsszOrderedDict.itemscCst|S)N)r )rrrrvaluesszOrderedDict.valuescCs0||kr||}||=|S||jkr,t||S)N)_OrderedDict__markerr?)rrdefaultresultrrrr7s zOrderedDict.popNcCs||kr||S|||<|S)Nr)rrrNrrr setdefaultszOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|jfS)Nz%s()z%s(%r)) __class__rlistrK)rrrr__repr__szOrderedDict.__repr__cCsHt|j}xttD]}|j|dqW|jf|p8ddt|jfS)N)varscopyrr7rQiterrK)rZ inst_dictkrrr __reduce__s zOrderedDict.__reduce__cCs |j|S)N)rQ)rrrrrU szOrderedDict.copycCs |}x|D] }|||<q W|S)Nr)clsiterabler3rrrrrfromkeyss  zOrderedDict.fromkeyscCs2t|tr&tj||o$ttt||Stj||S)N) isinstancerr>__eq__allmap_eq)rotherrrrr]s zOrderedDict.__eq__)T)T)N)N)!rrrr2r>r6r,r!r:r<rr=r@rBrIMutableMappingupdater.rJrKrL__ne__objectrMr7rP_recursive_reprrSrXrU classmethodr[r]rrrrrGs.          )rafrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values.' return OrderedDict(zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) {field_defs} z {name}=%rzW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') F)verboserenamemodulec Cst|tr|jddj}ttt|}t|}|rt}xNt|D]B\}}|j spt |sp|j dsp||kr|d|||<|j |qDWxN|g|D]@}t |tk rt d|jstd|t |rtd|qWt}xJ|D]B}|j do| rtd|||krtd ||j |qWtj|t|t|tt|jd d d dd jdd|Ddjddt|Dd}td|d} t|| | |} || _|rt| j|dkrytjd jjdd}Wnttfk rYnX|dk r || _| S)N, _z_%dz*Type names and field names must be stringsz8Type names and field names must be valid identifiers: %rz2Type names and field names cannot be a keyword: %rz/Field names cannot start with an underscore: %rz$Encountered duplicate field name: %r'r&z, css|]}tj|dVqdS))nameN)_repr_templateformat).0rprrr sznamedtuple.. css |]\}}tj||dVqdS))indexrpN)_field_templaterr)rsrvrprrrrts)typename field_names num_fieldsarg_listrepr_fmt field_defsz namedtuple_%s)rr__main__)r\strreplacesplitrRr_set enumerate isidentifier _iskeyword startswithaddtyper' ValueError_class_templaterrtupler(reprjoinr>exec_sourceprintrD _getframe f_globalsgetr*r) rxryrhrirjseenrvrpclass_definition namespacerOrrrresj               cCs*|j}x|D]}||dd||<q WdS)Nr r&)r)mappingrZZ mapping_getelemrrr_count_elementss r)rcseZdZfddZddZd.ddZdd Zed/d d Zfd d Z ddZ ddZ ddZ fddZ ddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-ZZS)0rcsN|s td|^}}t|dkr0tdt|tt|j|j||dS)Nz;descriptor '__init__' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %d)r'r(superrr2rc)r/r0r)rQrrr2s  zCounter.__init__cCsdS)Nr r)rrrrr __missing__szCounter.__missing__NcCs6|dkrt|jtdddStj||jtddS)Nr&T)rreverse)r)sortedrK _itemgetter_heapqnlargest)rrGrrr most_commons zCounter.most_commoncCstjtt|jS)N)_chain from_iterable_starmap_repeatrK)rrrrelements+szCounter.elementscCs tddS)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)rYrZvrrrr[CszCounter.fromkeyscs|s td|^}}t|dkr0tdt||r<|dnd}|dk rt|tr|r|j}x8|jD]\}}|||d||<qfWqtt|j|n t |||r|j|dS)Nz9descriptor 'update' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr ) r'r(r\MappingrrKrrrcr)r/r0rrZself_getrcount)rQrrrcJs    zCounter.updatecOs|s td|^}}t|dkr0tdt||r<|dnd}|dk r|j}t|trxH|jD]\}}||d|||<qbWn x|D]}||dd||<qW|r|j|dS)Nz;descriptor 'subtract' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr )r'r(rr\rrKsubtract)r/r0rrZrrrrrrrrs   zCounter.subtractcCs |j|S)N)rQ)rrrrrUsz Counter.copycCs|jt|ffS)N)rQr>)rrrrrXszCounter.__reduce__cs||krtj|dS)N)rr:)rr)rQrrr:szCounter.__delitem__c Cs`|sd|jjSy&djtdj|j}d|jj|fStk rZdj|jjt|SXdS)Nz%s()z, z%r: %rz%s({%s})z {0}({1!r})) rQrrr___mod__rr'rrr>)rrKrrrrSs zCounter.__repr__cCsxt|tstSt}x0|jD]$\}}|||}|dkr|||<qWx,|jD] \}}||krP|dkrP|||<qPW|S)Nr )r\rNotImplementedrK)rrarOrrnewcountrrr__add__s    zCounter.__add__cCs|t|tstSt}x0|jD]$\}}|||}|dkr|||<qWx0|jD]$\}}||krP|dkrPd|||<qPW|S)Nr )r\rrrK)rrarOrrrrrr__sub__s   zCounter.__sub__cCst|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qWx,|jD] \}}||kr\|dkr\|||<q\W|S)Nr )r\rrrK)rrarOrr other_countrrrr__or__s   zCounter.__or__cCsVt|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qW|S)Nr )r\rrrK)rrarOrrrrrrr__and__s  zCounter.__and__cCs0t}x$|jD]\}}|dkr|||<qW|S)Nr )rrK)rrOrrrrr__pos__s  zCounter.__pos__cCs4t}x(|jD]\}}|dkrd|||<qW|S)Nr )rrK)rrOrrrrr__neg__s zCounter.__neg__cCs*dd|jD}x|D] }||=qW|S)NcSsg|]\}}|dks|qS)r r)rsrrrrr sz*Counter._keep_positive..)rK)r nonpositiverrrr_keep_positives  zCounter._keep_positivecCs.x$|jD]\}}|||7<q W|jS)N)rKr)rrarrrrr__iadd__s zCounter.__iadd__cCs.x$|jD]\}}|||8<q W|jS)N)rKr)rrarrrrr__isub__%s zCounter.__isub__cCs6x,|jD] \}}||}||kr |||<q W|jS)N)rKr)rrarrrrrr__ior__2s  zCounter.__ior__cCs6x,|jD] \}}||}||kr |||<q W|jS)N)rKr)rrarrrrrr__iand__As  zCounter.__iand__)N)N)rrrr2rrrrgr[rcrrUrXr:rSrrrrrrrrrrr __classcell__rr)rQrrs.3    ("    c@seZdZddZddZddZd&dd Zd d Zd d ZddZ ddZ e ddZ e ddZddZeZd'ddZeddZddZddZd d!Zd"d#Zd$d%ZdS)(r cGst|p ig|_dS)N)rRmaps)rrrrrr2cszChainMap.__init__cCs t|dS)N)r?)rrrrrrjszChainMap.__missing__c Cs8x,|jD]"}y||Stk r(YqXqW|j|S)N)rr?r)rrrrrr __getitem__ms   zChainMap.__getitem__NcCs||kr||S|S)Nr)rrrNrrrrusz ChainMap.getcCsttj|jS)N)r(runionr)rrrr__len__xszChainMap.__len__cCsttj|jS)N)rVrrr)rrrrr<{szChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr)rsm)rrrrtsz(ChainMap.__contains__..)anyr)rrr)rr __contains__~szChainMap.__contains__cCs t|jS)N)rr)rrrr__bool__szChainMap.__bool__cCsdj|djtt|jS)Nz{0.__class__.__name__}({1})z, )rrrr_rr)rrrrrSszChainMap.__repr__cGs|tj|f|S)N)r>r[)rYrZr/rrrr[szChainMap.fromkeyscCs$|j|jdjf|jddS)Nr r&)rQrrU)rrrrrUsz ChainMap.copycCs|dkr i}|j|f|jS)N)rQr)rrrrr new_childszChainMap.new_childcCs|j|jddS)Nr&)rQr)rrrrparentsszChainMap.parentscCs||jd|<dS)Nr )r)rrr3rrrr6szChainMap.__setitem__c Cs8y|jd|=Wn"tk r2tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr?rr)rrrrrr:szChainMap.__delitem__c Cs0y|jdjStk r*tdYnXdS)Nr z#No keys found in the first mapping.)rr@r?)rrrrr@szChainMap.popitemc Gs>y|jdj|f|Stk r8tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr7r?rr)rrr/rrrr7sz ChainMap.popcCs|jdjdS)Nr )rr=)rrrrr=szChainMap.clear)N)N)rrrr2rrrrr<rrrfrSrgr[rU__copy__rpropertyrr6r:r@r7r=rrrrr Us&    c@sbeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ e dddZ dS)rcOs|s td|^}}t|dkr0tdt||r>|d}n0d|krj|jd}ddl}|jdtddnd}i|_|dk r|j|t|r|j|dS) Nzz0Passing 'dict' as keyword argument is deprecatedrC) stacklevel)r'r(r7warningswarnDeprecationWarningdatarc)r/kwargsrr>rrrrr2s$     zUserDict.__init__cCs t|jS)N)r(r)rrrrrszUserDict.__len__cCs:||jkr|j|St|jdr.|jj||St|dS)Nr)rhasattrrQrr?)rrrrrrs    zUserDict.__getitem__cCs||j|<dS)N)r)rritemrrrr6szUserDict.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserDict.__delitem__cCs t|jS)N)rVr)rrrrr<szUserDict.__iter__cCs ||jkS)N)r)rrrrrrszUserDict.__contains__cCs t|jS)N)rr)rrrrrSszUserDict.__repr__c CsR|jtkrt|jjSddl}|j}zi|_|j|}Wd||_X|j||S)Nr )rQrrrUrc)rrUrcrrrrUs  z UserDict.copyNcCs |}x|D] }|||<q W|S)Nr)rYrZr3drrrrr[s  zUserDict.fromkeys)N)rrrr2rrr6r:r<rrSrUrgr[rrrrrs c@seZdZd=ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#ZeZd$d%Zd&d'Zd(d)Zd?d+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z dS)@rNcCsbg|_|dk r^t|t|jkr0||jdd<n.t|trT|jdd|jdd<n t||_dS)N)rrr\rrR)rinitlistrrrr2s zUserList.__init__cCs t|jS)N)rr)rrrrrSszUserList.__repr__cCs|j|j|kS)N)r_UserList__cast)rrarrr__lt__szUserList.__lt__cCs|j|j|kS)N)rr)rrarrr__le__szUserList.__le__cCs|j|j|kS)N)rr)rrarrrr]szUserList.__eq__cCs|j|j|kS)N)rr)rrarrr__gt__szUserList.__gt__cCs|j|j|kS)N)rr)rrarrr__ge__szUserList.__ge__cCst|tr|jS|S)N)r\rr)rrarrr__castszUserList.__castcCs ||jkS)N)r)rrrrrrszUserList.__contains__cCs t|jS)N)r(r)rrrrrszUserList.__len__cCs |j|S)N)r)rirrrrszUserList.__getitem__cCs||j|<dS)N)r)rrrrrrr6szUserList.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserList.__delitem__cCsPt|tr|j|j|jSt|t|jr<|j|j|S|j|jt|S)N)r\rrQrrrR)rrarrrrs  zUserList.__add__cCsPt|tr|j|j|jSt|t|jr<|j||jS|jt||jS)N)r\rrQrrrR)rrarrr__radd__#s  zUserList.__radd__cCsRt|tr|j|j7_n2t|t|jr<|j|7_n|jt|7_|S)N)r\rrrrR)rrarrrr)s  zUserList.__iadd__cCs|j|j|S)N)rQr)rrGrrr__mul__1szUserList.__mul__cCs|j|9_|S)N)r)rrGrrr__imul__4szUserList.__imul__cCs|jj|dS)N)rappend)rrrrrr7szUserList.appendcCs|jj||dS)N)rinsert)rrrrrrr8szUserList.insertr&cCs |jj|S)N)rr7)rrrrrr79sz UserList.popcCs|jj|dS)N)rremove)rrrrrr:szUserList.removecCs|jjdS)N)rr=)rrrrr=;szUserList.clearcCs |j|S)N)rQ)rrrrrU<sz UserList.copycCs |jj|S)N)rr)rrrrrr=szUserList.countcGs|jj|f|S)N)rrv)rrr/rrrrv>szUserList.indexcCs|jjdS)N)rr)rrrrr?szUserList.reversecOs|jj||dS)N)rsort)rr/r0rrrr@sz UserList.sortcCs*t|tr|jj|jn |jj|dS)N)r\rrextend)rrarrrrAs zUserList.extend)Nr)r)!rrrr2rSrrr]rrrrrrr6r:rrrr__rmul__rrrr7rr=rUrrvrrrrrrrrs<  c@s`eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&ZeZd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1ejfd2d3Zdd5d6Zd1ejfd7d8Z dd:d;Z!d1ejfdd?Z#d@dAZ$d1ejfdBdCZ%dDdEZ&dFdGZ'dHdIZ(dJdKZ)dLdMZ*dNdOZ+dPdQZ,dRdSZ-dTdUZ.dVdWZ/dXdYZ0dZd[Z1d\d]Z2d^d_Z3dd`daZ4e5j6Z6dbdcZ7ddedfZ8d1ejfdgdhZ9d1ejfdidjZ:dkdlZ;dmdnZddsdtZ?ddvdwZ@d1ejfdxdyZAddzd{ZBd|d}ZCd~dZDddZEddZFddZGd4S)rcCs<t|tr||_n&t|tr.|jdd|_n t||_dS)N)r\rrr)rseqrrrr2Ns   zUserString.__init__cCs t|jS)N)rr)rrrr__str__UszUserString.__str__cCs t|jS)N)rr)rrrrrSVszUserString.__repr__cCs t|jS)N)intr)rrrr__int__WszUserString.__int__cCs t|jS)N)floatr)rrrr __float__XszUserString.__float__cCs t|jS)N)complexr)rrrr __complex__YszUserString.__complex__cCs t|jS)N)hashr)rrrr__hash__ZszUserString.__hash__cCs|jddfS)N)r)rrrr__getnewargs__[szUserString.__getnewargs__cCs t|tr|j|jkS|j|kS)N)r\rr)rstringrrrr]^s  zUserString.__eq__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrbs  zUserString.__lt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrfs  zUserString.__le__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrjs  zUserString.__gt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrns  zUserString.__ge__cCst|tr|j}||jkS)N)r\rr)rcharrrrrss zUserString.__contains__cCs t|jS)N)r(r)rrrrrxszUserString.__len__cCs|j|j|S)N)rQr)rrvrrrryszUserString.__getitem__cCsJt|tr|j|j|jSt|tr6|j|j|S|j|jt|S)N)r\rrQrr)rrarrrrzs   zUserString.__add__cCs.t|tr|j||jS|jt||jS)N)r\rrQr)rrarrrrs zUserString.__radd__cCs|j|j|S)N)rQr)rrGrrrrszUserString.__mul__cCs|j|j|S)N)rQr)rr/rrrrszUserString.__mod__cCs|j|tS)N)rQr/)rrrrrr__rmod__szUserString.__rmod__cCs|j|jjS)N)rQr capitalize)rrrrrszUserString.capitalizecCs|j|jjS)N)rQrcasefold)rrrrrszUserString.casefoldcGs|j|jj|f|S)N)rQrcenter)rwidthr/rrrrszUserString.centerr cCs t|tr|j}|jj|||S)N)r\rrr)rsubstartendrrrrs zUserString.countNcCs>|r.|r|j|jj||S|j|jj|S|j|jjS)N)rQrencode)rencodingerrorsrrrrs zUserString.encodecCs|jj|||S)N)rendswith)rsuffixrrrrrrszUserString.endswithcCs|j|jj|S)N)rQr expandtabs)rtabsizerrrrszUserString.expandtabscCs t|tr|j}|jj|||S)N)r\rrfind)rrrrrrrrs zUserString.findcOs|jj||S)N)rrr)rr/r0rrrrrszUserString.formatcCs |jj|S)N)r format_map)rrrrrrszUserString.format_mapcCs|jj|||S)N)rrv)rrrrrrrrvszUserString.indexcCs |jjS)N)risalpha)rrrrrszUserString.isalphacCs |jjS)N)risalnum)rrrrrszUserString.isalnumcCs |jjS)N)r isdecimal)rrrrrszUserString.isdecimalcCs |jjS)N)risdigit)rrrrr szUserString.isdigitcCs |jjS)N)rr)rrrrrszUserString.isidentifiercCs |jjS)N)rislower)rrrrr szUserString.islowercCs |jjS)N)r isnumeric)rrrrr szUserString.isnumericcCs |jjS)N)r isprintable)rrrrr szUserString.isprintablecCs |jjS)N)risspace)rrrrr szUserString.isspacecCs |jjS)N)ristitle)rrrrrszUserString.istitlecCs |jjS)N)risupper)rrrrrszUserString.isuppercCs |jj|S)N)rr)rrrrrrszUserString.joincGs|j|jj|f|S)N)rQrljust)rrr/rrrrszUserString.ljustcCs|j|jjS)N)rQrlower)rrrrrszUserString.lowercCs|j|jj|S)N)rQrlstrip)rcharsrrrrszUserString.lstripcCs |jj|S)N)r partition)rseprrrrszUserString.partitionr&cCs6t|tr|j}t|tr |j}|j|jj|||S)N)r\rrrQr)roldnewmaxsplitrrrrs   zUserString.replacecCs t|tr|j}|jj|||S)N)r\rrrfind)rrrrrrrrs zUserString.rfindcCs|jj|||S)N)rrindex)rrrrrrrrszUserString.rindexcGs|j|jj|f|S)N)rQrrjust)rrr/rrrrszUserString.rjustcCs |jj|S)N)r rpartition)rrrrrrszUserString.rpartitioncCs|j|jj|S)N)rQrrstrip)rrrrrrszUserString.rstripcCs|jj||S)N)rr)rrrrrrrszUserString.splitcCs|jj||S)N)rrsplit)rrrrrrrszUserString.rsplitFcCs |jj|S)N)r splitlines)rkeependsrrrrszUserString.splitlinescCs|jj|||S)N)rr)rprefixrrrrrrszUserString.startswithcCs|j|jj|S)N)rQrstrip)rrrrrr"szUserString.stripcCs|j|jjS)N)rQrswapcase)rrrrr#szUserString.swapcasecCs|j|jjS)N)rQrtitle)rrrrr$szUserString.titlecGs|j|jj|S)N)rQr translate)rr/rrrr%szUserString.translatecCs|j|jjS)N)rQrupper)rrrrr&szUserString.uppercCs|j|jj|S)N)rQrzfill)rrrrrr'szUserString.zfill)NN)r)Nr)r)Nr)Nrr)Nr)F)N)Hrrrr2rrSrrrrrr]rrrrrrrrrrrrrrrrrDmaxsizerrrrrrrrrvrrrr rr r r r rrrrrrr maketransrrrrrrrrrrrr"r#r$r%r&r'rrrrrMs         )7__all___collections_abcoperatorr rr r`keywordrrsysrDheapqr_weakrefrr, itertoolsrrrrrrreprlibrrf _collectionsr ImportErrorMutableSequenceregisterrKeysViewr ItemsViewr ValuesViewr rer!r>rrrqrwrrrrbr rrSequencerrrrrs^       `3blCIPK!;__pycache__/abc.cpython-36.pycnu[3  fD@sddlTddlmZdS))*)__all__N)_collections_abcrrr4/opt/alt/python36/lib64/python3.6/collections/abc.pysPK!M铎)__pycache__/__init__.cpython-36.opt-1.pycnu[3  f$@sdZddddddddd g Zd d lTd d lZeej7Zd d lmZmZd dlm Z d d l Z d d l Zd dlmZd dlmZmZmZd dlmZyd dlmZWnek rYn Xej eyd dlm!Z!Wnek rYnXGddde"Z#Gddde$Z%Gddde&Z'Gddde(Z)Gddde*Z+yd dlm+Z+Wnek rXYnXdZ,dZ-d Z.d!d!d d"d#dZ/d$d%Z0yd d&lm0Z0Wnek rYnXGd'dde*Z1Gd(d d e2Z3Gd)dde2Z4Gd*ddeZ5Gd+dde6Z7d S),a?This module implements specialized container datatypes providing alternatives to Python's general purpose built-in containers, dict, list, set, and tuple. * namedtuple factory function for creating tuple subclasses with named fields * deque list-like container with fast appends and pops on either end * ChainMap dict-like class for creating a single view of multiple mappings * Counter dict subclass for counting hashable objects * OrderedDict dict subclass that remembers the order entries were added * defaultdict dict subclass that calls a factory function to supply missing values * UserDict wrapper around dictionary objects for easier dict subclassing * UserList wrapper around list objects for easier list subclassing * UserString wrapper around string objects for easier string subclassing deque defaultdict namedtupleUserDictUserList UserStringCounter OrderedDictChainMap)*N) itemgettereq) iskeyword)proxy)repeatchainstarmap)recursive_repr)r)rc@seZdZddZdS)_OrderedDictKeysViewccst|jEdHdS)N)reversed_mapping)selfr9/opt/alt/python36/lib64/python3.6/collections/__init__.py __reversed__5sz!_OrderedDictKeysView.__reversed__N)__name__ __module__ __qualname__rrrrrr3src@seZdZddZdS)_OrderedDictItemsViewccs(x"t|jD]}||j|fVq WdS)N)rr)rkeyrrrr:sz"_OrderedDictItemsView.__reversed__N)rrrrrrrrr8src@seZdZddZdS)_OrderedDictValuesViewccs$xt|jD]}|j|Vq WdS)N)rr)rrrrrr@sz#_OrderedDictValuesView.__reversed__N)rrrrrrrrr >sr c@seZdZdZdS)_Linkprevnextr __weakref__N)r"r#rr$)rrr __slots__rrrrr!Dsr!c@seZdZdZddZejeefddZej fddZ dd Z d d Z d d Z d*ddZ d+ddZddZejZZddZddZddZejZeZefddZd,ddZed d!Zd"d#Zd$d%Zed-d&d'Z d(d)Z!dS).rz)Dictionary that remembers insertion orderc Os|s td|^}}t|dkr0tdt|y |jWn>tk rxt|_t|j|_}||_|_i|_ YnX|j ||dS)zInitialize an ordered dictionary. The signature is the same as regular dictionaries. Keyword argument order is preserved. z?descriptor '__init__' of 'OrderedDict' object needs an argumentz$expected at most 1 arguments, got %dN) TypeErrorlen_OrderedDict__rootAttributeErrorr!_OrderedDict__hardroot_proxyr"r#_OrderedDict__map_OrderedDict__update)argskwdsrrootrrr__init__Vs    zOrderedDict.__init__c CsZ||krJ||j|<}|j}|j}||||_|_|_||_|||_||||dS)z!od.__setitem__(i, y) <==> od[i]=yN)r-r)r"r#r) rrvalueZ dict_setitemrZLinklinkr1lastrrr __setitem__is zOrderedDict.__setitem__cCs>||||jj|}|j}|j}||_||_d|_d|_dS)z od.__delitem__(y) <==> del od[y]N)r-popr"r#)rrZ dict_delitemr4 link_prev link_nextrrr __delitem__ws  zOrderedDict.__delitem__ccs,|j}|j}x||k r&|jV|j}qWdS)zod.__iter__() <==> iter(od)N)r)r#r)rr1currrrr__iter__s  zOrderedDict.__iter__ccs,|j}|j}x||k r&|jV|j}qWdS)z#od.__reversed__() <==> reversed(od)N)r)r"r)rr1r;rrrrs  zOrderedDict.__reversed__cCs*|j}||_|_|jjtj|dS)z.od.clear() -> None. Remove all items from od.N)r)r"r#r-cleardict)rr1rrrr=s  zOrderedDict.clearTcCsj|s td|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=tj||}||fS)zRemove and return a (key, value) pair from the dictionary. Pairs are returned in LIFO order if last is true or FIFO order if false. zdictionary is empty)KeyErrorr)r"r#rr-r>r7)rr5r1r4r8r9rr3rrrpopitems  zOrderedDict.popitemc Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)zMove an existing element to the end (or beginning if last==False). Raises KeyError if the element does not exist. When last=True, acts like a fast version of self[key]=self.pop(key). N)r-r"r#r)) rrr5r4r8r9Z soft_linkr1firstrrr move_to_ends$ zOrderedDict.move_to_endcCsVtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S)Nr&)_sys getsizeofr(__dict__r-r+r))rZsizeofnsizerrr __sizeof__s  zOrderedDict.__sizeof__cCst|S)z:D.keys() -> a set-like object providing a view on D's keys)r)rrrrkeysszOrderedDict.keyscCst|S)z a set-like object providing a view on D's items)r)rrrritemsszOrderedDict.itemscCst|S)z6D.values() -> an object providing a view on D's values)r )rrrrvaluesszOrderedDict.valuescCs0||kr||}||=|S||jkr,t||S)zod.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised. )_OrderedDict__markerr?)rrdefaultresultrrrr7s zOrderedDict.popNcCs||kr||S|||<|S)zDod.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in odr)rrrNrrr setdefaultszOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|jfS)zod.__repr__() <==> repr(od)z%s()z%s(%r)) __class__rlistrK)rrrr__repr__szOrderedDict.__repr__cCsHt|j}xttD]}|j|dqW|jf|p8ddt|jfS)z%Return state information for picklingN)varscopyrr7rQiterrK)rZ inst_dictkrrr __reduce__s zOrderedDict.__reduce__cCs |j|S)z!od.copy() -> a shallow copy of od)rQ)rrrrrU szOrderedDict.copycCs |}x|D] }|||<q W|S)zOD.fromkeys(S[, v]) -> New ordered dictionary with keys from S. If not specified, the value defaults to None. r)clsiterabler3rrrrrfromkeyss  zOrderedDict.fromkeyscCs2t|tr&tj||o$ttt||Stj||S)zod.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive while comparison to a regular mapping is order-insensitive. ) isinstancerr>__eq__allmap_eq)rotherrrrr]s zOrderedDict.__eq__)T)T)N)N)"rrr__doc__r2r>r6r,r!r:r<rr=r@rBrIMutableMappingupdater.rJrKrL__ne__objectrMr7rP_recursive_reprrSrXrU classmethodr[r]rrrrrGs0          )rafrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values.' return OrderedDict(zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) {field_defs} z {name}=%rzW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') F)verboserenamemodulec Cst|tr|jddj}ttt|}t|}|rt}xNt|D]B\}}|j spt |sp|j dsp||kr|d|||<|j |qDWxN|g|D]@}t |tk rt d|jstd|t |rtd|qWt}xJ|D]B}|j do| rtd|||krtd ||j |qWtj|t|t|tt|jd d d dd jdd|Ddjddt|Dd}td|d} t|| | |} || _|rt| j|dkrytjd jjdd}Wnttfk rYnX|dk r || _| S)aCReturns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', ['x', 'y']) >>> Point.__doc__ # docstring for the new class 'Point(x, y)' >>> p = Point(11, y=22) # instantiate with positional args or keywords >>> p[0] + p[1] # indexable like a plain tuple 33 >>> x, y = p # unpack like a regular tuple >>> x, y (11, 22) >>> p.x + p.y # fields also accessible by name 33 >>> d = p._asdict() # convert to a dictionary >>> d['x'] 11 >>> Point(**d) # convert from a dictionary Point(x=11, y=22) >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields Point(x=100, y=22) , _z_%dz*Type names and field names must be stringsz8Type names and field names must be valid identifiers: %rz2Type names and field names cannot be a keyword: %rz/Field names cannot start with an underscore: %rz$Encountered duplicate field name: %r'r&z, css|]}tj|dVqdS))nameN)_repr_templateformat).0rqrrr sznamedtuple.. css |]\}}tj||dVqdS))indexrqN)_field_templaters)rtrwrqrrrrus)typename field_names num_fieldsarg_listrepr_fmt field_defsz namedtuple_%s)rNr__main__)r\strreplacesplitrRr_set enumerate isidentifier _iskeyword startswithaddtyper' ValueError_class_templaterstupler(reprjoinr>exec_sourceprintrD _getframe f_globalsgetr*r) ryrzrirjrkseenrwrqclass_definition namespacerOrrrresj               cCs*|j}x|D]}||dd||<q WdS)z!Tally elements from the iterable.r r&N)r)mappingrZZ mapping_getelemrrr_count_elementss r)rcseZdZdZfddZddZd/ddZd d Zed0d d Z fd dZ ddZ ddZ ddZ fddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.ZZS)1raDict subclass for counting hashable items. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are stored as dictionary values. >>> c = Counter('abcdeabcdabcaba') # count elements from a string >>> c.most_common(3) # three most common elements [('a', 5), ('b', 4), ('c', 3)] >>> sorted(c) # list all unique elements ['a', 'b', 'c', 'd', 'e'] >>> ''.join(sorted(c.elements())) # list elements with repetitions 'aaaaabbbbcccdde' >>> sum(c.values()) # total of all counts 15 >>> c['a'] # count of letter 'a' 5 >>> for elem in 'shazam': # update counts from an iterable ... c[elem] += 1 # by adding 1 to each element's count >>> c['a'] # now there are seven 'a' 7 >>> del c['b'] # remove all 'b' >>> c['b'] # now there are zero 'b' 0 >>> d = Counter('simsalabim') # make another counter >>> c.update(d) # add in the second counter >>> c['a'] # now there are nine 'a' 9 >>> c.clear() # empty the counter >>> c Counter() Note: If a count is set to zero or reduced to zero, it will remain in the counter until the entry is deleted or the counter is cleared: >>> c = Counter('aaabbc') >>> c['b'] -= 2 # reduce the count of 'b' by two >>> c.most_common() # 'b' is still in, but its count is zero [('a', 3), ('c', 1), ('b', 0)] csN|s td|^}}t|dkr0tdt|tt|j|j||dS)a Create a new, empty Counter object. And if given, count elements from an input iterable. Or, initialize the count from another mapping of elements to their counts. >>> c = Counter() # a new, empty counter >>> c = Counter('gallahad') # a new counter from an iterable >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping >>> c = Counter(a=4, b=2) # a new counter from keyword args z;descriptor '__init__' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dN)r'r(superrr2rd)r/r0r)rQrrr2s  zCounter.__init__cCsdS)z1The count of elements not in the Counter is zero.r r)rrrrr __missing__szCounter.__missing__NcCs6|dkrt|jtdddStj||jtddS)zList the n most common elements and their counts from the most common to the least. If n is None, then list all element counts. >>> Counter('abcdeabcdabcaba').most_common(3) [('a', 5), ('b', 4), ('c', 3)] Nr&T)rreverse)r)sortedrK _itemgetter_heapqnlargest)rrGrrr most_commons zCounter.most_commoncCstjtt|jS)aIterator over elements repeating each as many times as its count. >>> c = Counter('ABCABC') >>> sorted(c.elements()) ['A', 'A', 'B', 'B', 'C', 'C'] # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) >>> product = 1 >>> for factor in prime_factors.elements(): # loop over factors ... product *= factor # and multiply them >>> product 1836 Note, if an element's count has been set to zero or is a negative number, elements() will ignore it. )_chain from_iterable_starmap_repeatrK)rrrrelements+szCounter.elementscCs tddS)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)rYrZvrrrr[CszCounter.fromkeyscs|s td|^}}t|dkr0tdt||r<|dnd}|dk rt|tr|r|j}x8|jD]\}}|||d||<qfWqtt|j|n t |||r|j|dS)aLike dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 z9descriptor 'update' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr N) r'r(r\MappingrrKrrrdr)r/r0rrZself_getrcount)rQrrrdJs    zCounter.updatecOs|s td|^}}t|dkr0tdt||r<|dnd}|dk r|j}t|trxH|jD]\}}||d|||<qbWn x|D]}||dd||<qW|r|j|dS)aLike dict.update() but subtracts counts instead of replacing them. Counts can be reduced below zero. Both the inputs and outputs are allowed to contain zero and negative counts. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.subtract('witch') # subtract elements from another iterable >>> c.subtract(Counter('watch')) # subtract elements from another counter >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch 0 >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch -1 z;descriptor 'subtract' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr N)r'r(rr\rrKsubtract)r/r0rrZrrrrrrrrs   zCounter.subtractcCs |j|S)zReturn a shallow copy.)rQ)rrrrrUsz Counter.copycCs|jt|ffS)N)rQr>)rrrrrXszCounter.__reduce__cs||krtj|dS)zGLike dict.__delitem__() but does not raise KeyError for missing values.N)rr:)rr)rQrrr:szCounter.__delitem__c Cs`|sd|jjSy&djtdj|j}d|jj|fStk rZdj|jjt|SXdS)Nz%s()z, z%r: %rz%s({%s})z {0}({1!r})) rQrrr___mod__rr'rsr>)rrKrrrrSs zCounter.__repr__cCsxt|tstSt}x0|jD]$\}}|||}|dkr|||<qWx,|jD] \}}||krP|dkrP|||<qPW|S)zAdd counts from two counters. >>> Counter('abbb') + Counter('bcc') Counter({'b': 4, 'c': 2, 'a': 1}) r )r\rNotImplementedrK)rrarOrrnewcountrrr__add__s    zCounter.__add__cCs|t|tstSt}x0|jD]$\}}|||}|dkr|||<qWx0|jD]$\}}||krP|dkrPd|||<qPW|S)z Subtract count, but keep only results with positive counts. >>> Counter('abbbc') - Counter('bccd') Counter({'b': 2, 'a': 1}) r )r\rrrK)rrarOrrrrrr__sub__s   zCounter.__sub__cCst|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qWx,|jD] \}}||kr\|dkr\|||<q\W|S)zUnion is the maximum of value in either of the input counters. >>> Counter('abbb') | Counter('bcc') Counter({'b': 3, 'c': 2, 'a': 1}) r )r\rrrK)rrarOrr other_countrrrr__or__s   zCounter.__or__cCsVt|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qW|S)z Intersection is the minimum of corresponding counts. >>> Counter('abbb') & Counter('bcc') Counter({'b': 1}) r )r\rrrK)rrarOrrrrrrr__and__s  zCounter.__and__cCs0t}x$|jD]\}}|dkr|||<qW|S)zEAdds an empty counter, effectively stripping negative and zero countsr )rrK)rrOrrrrr__pos__s  zCounter.__pos__cCs4t}x(|jD]\}}|dkrd|||<qW|S)z{Subtracts from an empty counter. Strips positive and zero counts, and flips the sign on negative counts. r )rrK)rrOrrrrr__neg__s zCounter.__neg__cCs*dd|jD}x|D] }||=qW|S)z?Internal method to strip elements with a negative or zero countcSsg|]\}}|dks|qS)r r)rtrrrrr sz*Counter._keep_positive..)rK)r nonpositiverrrr_keep_positives  zCounter._keep_positivecCs.x$|jD]\}}|||7<q W|jS)zInplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) )rKr)rrarrrrr__iadd__s zCounter.__iadd__cCs.x$|jD]\}}|||8<q W|jS)zInplace subtract counter, but keep only results with positive counts. >>> c = Counter('abbbc') >>> c -= Counter('bccd') >>> c Counter({'b': 2, 'a': 1}) )rKr)rrarrrrr__isub__%s zCounter.__isub__cCs6x,|jD] \}}||}||kr |||<q W|jS)zInplace union is the maximum of value from either counter. >>> c = Counter('abbb') >>> c |= Counter('bcc') >>> c Counter({'b': 3, 'c': 2, 'a': 1}) )rKr)rrarrrrrr__ior__2s  zCounter.__ior__cCs6x,|jD] \}}||}||kr |||<q W|jS)zInplace intersection is the minimum of corresponding counts. >>> c = Counter('abbb') >>> c &= Counter('bcc') >>> c Counter({'b': 1}) )rKr)rrarrrrrr__iand__As  zCounter.__iand__)N)N)rrrrbr2rrrrhr[rdrrUrXr:rSrrrrrrrrrrr __classcell__rr)rQrrs0+    ("    c@seZdZdZddZddZddZd'd d Zd d Zd dZ ddZ ddZ e ddZ eddZddZeZd(ddZeddZddZdd Zd!d"Zd#d$Zd%d&ZdS))r a A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That list is public and can be accessed or updated using the *maps* attribute. There is no other state. Lookups search the underlying mappings successively until a key is found. In contrast, writes, updates, and deletions only operate on the first mapping. cGst|p ig|_dS)zInitialize a ChainMap by setting *maps* to the given mappings. If no mappings are provided, a single empty dictionary is used. N)rRmaps)rrrrrr2cszChainMap.__init__cCs t|dS)N)r?)rrrrrrjszChainMap.__missing__c Cs8x,|jD]"}y||Stk r(YqXqW|j|S)N)rr?r)rrrrrr __getitem__ms   zChainMap.__getitem__NcCs||kr||S|S)Nr)rrrNrrrrusz ChainMap.getcCsttj|jS)N)r(runionr)rrrr__len__xszChainMap.__len__cCsttj|jS)N)rVrrr)rrrrr<{szChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr)rtm)rrrrusz(ChainMap.__contains__..)anyr)rrr)rr __contains__~szChainMap.__contains__cCs t|jS)N)rr)rrrr__bool__szChainMap.__bool__cCsdj|djtt|jS)Nz{0.__class__.__name__}({1})z, )rsrr_rr)rrrrrSszChainMap.__repr__cGs|tj|f|S)z?Create a ChainMap with a single dict created from the iterable.)r>r[)rYrZr/rrrr[szChainMap.fromkeyscCs$|j|jdjf|jddS)zHNew ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]r r&N)rQrrU)rrrrrUsz ChainMap.copycCs|dkr i}|j|f|jS)zyNew ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. N)rQr)rrrrr new_childszChainMap.new_childcCs|j|jddS)zNew ChainMap from maps[1:].r&N)rQr)rrrrparentsszChainMap.parentscCs||jd|<dS)Nr )r)rrr3rrrr6szChainMap.__setitem__c Cs8y|jd|=Wn"tk r2tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr?rs)rrrrrr:szChainMap.__delitem__c Cs0y|jdjStk r*tdYnXdS)zPRemove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.r z#No keys found in the first mapping.N)rr@r?)rrrrr@szChainMap.popitemc Gs>y|jdj|f|Stk r8tdj|YnXdS)zWRemove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].r z(Key not found in the first mapping: {!r}N)rr7r?rs)rrr/rrrr7sz ChainMap.popcCs|jdjdS)z'Clear maps[0], leaving maps[1:] intact.r N)rr=)rrrrr=szChainMap.clear)N)N)rrrrbr2rrrrr<rrrgrSrhr[rU__copy__rpropertyrr6r:r@r7r=rrrrr Us(     c@sbeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ e dddZ dS)rcOs|s td|^}}t|dkr0tdt||r>|d}n0d|krj|jd}ddl}|jdtddnd}i|_|dk r|j|t|r|j|dS) Nzz0Passing 'dict' as keyword argument is deprecatedrC) stacklevel)r'r(r7warningswarnDeprecationWarningdatard)r/kwargsrr>rrrrr2s$     zUserDict.__init__cCs t|jS)N)r(r)rrrrrszUserDict.__len__cCs:||jkr|j|St|jdr.|jj||St|dS)Nr)rhasattrrQrr?)rrrrrrs    zUserDict.__getitem__cCs||j|<dS)N)r)rritemrrrr6szUserDict.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserDict.__delitem__cCs t|jS)N)rVr)rrrrr<szUserDict.__iter__cCs ||jkS)N)r)rrrrrrszUserDict.__contains__cCs t|jS)N)rr)rrrrrSszUserDict.__repr__c CsR|jtkrt|jjSddl}|j}zi|_|j|}Wd||_X|j||S)Nr )rQrrrUrd)rrUrcrrrrUs  z UserDict.copyNcCs |}x|D] }|||<q W|S)Nr)rYrZr3drrrrr[s  zUserDict.fromkeys)N)rrrr2rrr6r:r<rrSrUrhr[rrrrrs c@seZdZdZd>ddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$ZeZd%d&Zd'd(Zd)d*Zd@d,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Z dszUserList.indexcCs|jjdS)N)rr)rrrrr?szUserList.reversecOs|jj||dS)N)rsort)rr/r0rrrr@sz UserList.sortcCs*t|tr|jj|jn |jj|dS)N)r\rrextend)rrarrrrAs zUserList.extend)Nr)r)"rrrrbr2rSrrr]rrrrrrr6r:rrrr__rmul__rrrr7rr=rUrrwrrrrrrrrs>  c@s`eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&ZeZd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1ejfd2d3Zdd5d6Zd1ejfd7d8Z dd:d;Z!d1ejfdd?Z#d@dAZ$d1ejfdBdCZ%dDdEZ&dFdGZ'dHdIZ(dJdKZ)dLdMZ*dNdOZ+dPdQZ,dRdSZ-dTdUZ.dVdWZ/dXdYZ0dZd[Z1d\d]Z2d^d_Z3dd`daZ4e5j6Z6dbdcZ7ddedfZ8d1ejfdgdhZ9d1ejfdidjZ:dkdlZ;dmdnZddsdtZ?ddvdwZ@d1ejfdxdyZAddzd{ZBd|d}ZCd~dZDddZEddZFddZGd4S)rcCs<t|tr||_n&t|tr.|jdd|_n t||_dS)N)r\rrr)rseqrrrr2Ns   zUserString.__init__cCs t|jS)N)rr)rrrr__str__UszUserString.__str__cCs t|jS)N)rr)rrrrrSVszUserString.__repr__cCs t|jS)N)intr)rrrr__int__WszUserString.__int__cCs t|jS)N)floatr)rrrr __float__XszUserString.__float__cCs t|jS)N)complexr)rrrr __complex__YszUserString.__complex__cCs t|jS)N)hashr)rrrr__hash__ZszUserString.__hash__cCs|jddfS)N)r)rrrr__getnewargs__[szUserString.__getnewargs__cCs t|tr|j|jkS|j|kS)N)r\rr)rstringrrrr]^s  zUserString.__eq__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrbs  zUserString.__lt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrfs  zUserString.__le__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrjs  zUserString.__gt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrns  zUserString.__ge__cCst|tr|j}||jkS)N)r\rr)rcharrrrrss zUserString.__contains__cCs t|jS)N)r(r)rrrrrxszUserString.__len__cCs|j|j|S)N)rQr)rrwrrrryszUserString.__getitem__cCsJt|tr|j|j|jSt|tr6|j|j|S|j|jt|S)N)r\rrQrr)rrarrrrzs   zUserString.__add__cCs.t|tr|j||jS|jt||jS)N)r\rrQr)rrarrrrs zUserString.__radd__cCs|j|j|S)N)rQr)rrGrrrrszUserString.__mul__cCs|j|j|S)N)rQr)rr/rrrrszUserString.__mod__cCs|j|tS)N)rQr/)rrsrrr__rmod__szUserString.__rmod__cCs|j|jjS)N)rQr capitalize)rrrrrszUserString.capitalizecCs|j|jjS)N)rQrcasefold)rrrrrszUserString.casefoldcGs|j|jj|f|S)N)rQrcenter)rwidthr/rrrrszUserString.centerr cCs t|tr|j}|jj|||S)N)r\rrr)rsubstartendrrrrs zUserString.countNcCs>|r.|r|j|jj||S|j|jj|S|j|jjS)N)rQrencode)rencodingerrorsrrrrs zUserString.encodecCs|jj|||S)N)rendswith)rsuffixrrrrrrszUserString.endswithcCs|j|jj|S)N)rQr expandtabs)rtabsizerrrrszUserString.expandtabscCs t|tr|j}|jj|||S)N)r\rrfind)rrrrrrrrs zUserString.findcOs|jj||S)N)rrs)rr/r0rrrrsszUserString.formatcCs |jj|S)N)r format_map)rrrrrrszUserString.format_mapcCs|jj|||S)N)rrw)rrrrrrrrwszUserString.indexcCs |jjS)N)risalpha)rrrrrszUserString.isalphacCs |jjS)N)risalnum)rrrrrszUserString.isalnumcCs |jjS)N)r isdecimal)rrrrr szUserString.isdecimalcCs |jjS)N)risdigit)rrrrr szUserString.isdigitcCs |jjS)N)rr)rrrrrszUserString.isidentifiercCs |jjS)N)rislower)rrrrr szUserString.islowercCs |jjS)N)r isnumeric)rrrrr szUserString.isnumericcCs |jjS)N)r isprintable)rrrrr szUserString.isprintablecCs |jjS)N)risspace)rrrrrszUserString.isspacecCs |jjS)N)ristitle)rrrrrszUserString.istitlecCs |jjS)N)risupper)rrrrrszUserString.isuppercCs |jj|S)N)rr)rrrrrrszUserString.joincGs|j|jj|f|S)N)rQrljust)rrr/rrrrszUserString.ljustcCs|j|jjS)N)rQrlower)rrrrrszUserString.lowercCs|j|jj|S)N)rQrlstrip)rcharsrrrrszUserString.lstripcCs |jj|S)N)r partition)rseprrrrszUserString.partitionr&cCs6t|tr|j}t|tr |j}|j|jj|||S)N)r\rrrQr)roldnewmaxsplitrrrrs   zUserString.replacecCs t|tr|j}|jj|||S)N)r\rrrfind)rrrrrrrrs zUserString.rfindcCs|jj|||S)N)rrindex)rrrrrrrrszUserString.rindexcGs|j|jj|f|S)N)rQrrjust)rrr/rrrrszUserString.rjustcCs |jj|S)N)r rpartition)rrrrrrszUserString.rpartitioncCs|j|jj|S)N)rQrrstrip)rrrrrrszUserString.rstripcCs|jj||S)N)rr)rrrrrrrszUserString.splitcCs|jj||S)N)rrsplit)rrrrrrrszUserString.rsplitFcCs |jj|S)N)r splitlines)rkeependsrrrr szUserString.splitlinescCs|jj|||S)N)rr)rprefixrrrrrrszUserString.startswithcCs|j|jj|S)N)rQrstrip)rrrrrr#szUserString.stripcCs|j|jjS)N)rQrswapcase)rrrrr$szUserString.swapcasecCs|j|jjS)N)rQrtitle)rrrrr%szUserString.titlecGs|j|jj|S)N)rQr translate)rr/rrrr&szUserString.translatecCs|j|jjS)N)rQrupper)rrrrr'szUserString.uppercCs|j|jj|S)N)rQrzfill)rrrrrr(szUserString.zfill)NN)r)Nr)r)Nr)Nrr)Nr)F)N)Hrrrr2rrSrrrrrr]rrrrrrrrrrrrrrrrrDmaxsizerrrrrrsrrwrrr r rr r r rrrrrrrr maketransrrrrrrrrrr rr#r$r%r&r'r(rrrrrMs         )8rb__all___collections_abcoperatorr rr r`keywordrrsysrDheapqr_weakrefrr, itertoolsrrrrrrreprlibrrg _collectionsr ImportErrorMutableSequenceregisterrKeysViewr ItemsViewr ValuesViewr rfr!r>rrrrrxrrrrcr rrSequencerrrrrs`       `3blCIPK!9m$__pycache__/abc.cpython-36.opt-2.pycnu[3 2aD@sddlTddlmZdS))*)__all__N)_collections_abcrrr(/opt/alt/python36/lib64/python3.6/abc.pysPK!א  *__pycache__/__init__.cpython-311.opt-2.pycnu[PK!Cܝ11$[ __pycache__/__init__.cpython-311.pycnu[PK!<<L;__pycache__/abc.cpython-311.pycnu[PK!<<%<__pycache__/abc.cpython-311.opt-1.pycnu[PK!Cܝ11*h>__pycache__/__init__.cpython-311.opt-1.pycnu[PK!<<%_p__pycache__/abc.cpython-311.opt-2.pycnu[PK!"% ~22 q__init__.pynu[PK!ww]=abc.pynu[PK!88# >__pycache__/__init__.cpython-33.pyonu[PK!|w& #:__pycache__/__main__.cpython-33.pycnu[PK!88#mD__pycache__/__init__.cpython-33.pycnu[PK!VۍR R #@__pycache__/__main__.cpython-33.pyonu[PK!ݿJ__pycache__/abc.cpython-33.pyonu[PK!ݿl__pycache__/abc.cpython-33.pycnu[PK! / ;`__main__.pynu[PK!M铎#qe__pycache__/__init__.cpython-36.pycnu[PK!;$__pycache__/abc.cpython-36.opt-1.pycnu[PK!>JQ/)__pycache__/__init__.cpython-36.opt-2.pycnu[PK!;Q__pycache__/abc.cpython-36.pycnu[PK!M铎)e__pycache__/__init__.cpython-36.opt-1.pycnu[PK!9m$X __pycache__/abc.cpython-36.opt-2.pycnu[PKY