B /g^ @sdddddddddg Zd d lZd d lmZmZd d lmZ d d l Z d d l Z d d lmZd dlmZmZmZd dlmZyd dlmZWnek rYnXejeyd dlm Z Wnek rYnXddZ!Gdddej"Z#Gdddej$Z%Gdddej&Z'Gddde(Z)Gddde*Z+yd dlm+Z+Wnek rRYnXiZ,dd d dd dZ-d!d"Z.yd d#lm.Z.Wnek rYnXGd$dde*Z/Gd%ddej0Z1Gd&ddej0Z2Gd'ddejZ3Gd(ddej4Z5d S))deque defaultdict namedtupleUserDictUserList UserStringCounter OrderedDictChainMapN) itemgettereq) iskeyword)proxy)repeatchainstarmap)recursive_repr)r)rcCsR|tjkr:tt|}ddl}|jdtdd|t|<|Stdtd|dS)Nr zUsing or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working) stacklevelzmodule z has no attribute ) _collections_abc__all__getattrwarningswarnDeprecationWarningglobalsAttributeError__name__)nameobjrr ,/usr/lib64/python3.7/collections/__init__.py __getattr__*s    r"c@seZdZddZdS)_OrderedDictKeysViewccst|jEdHdS)N)reversed_mapping)selfr r r! __reversed__?sz!_OrderedDictKeysView.__reversed__N)r __module__ __qualname__r'r r r r!r#=sr#c@seZdZddZdS)_OrderedDictItemsViewccs(x"t|jD]}||j|fVq WdS)N)r$r%)r&keyr r r!r'Dsz"_OrderedDictItemsView.__reversed__N)rr(r)r'r r r r!r*Bsr*c@seZdZddZdS)_OrderedDictValuesViewccs$xt|jD]}|j|Vq WdS)N)r$r%)r&r+r r r!r'Jsz#_OrderedDictValuesView.__reversed__N)rr(r)r'r r r r!r,Hsr,c@seZdZdZdS)_Link)prevnextr+ __weakref__N)rr(r) __slots__r r r r!r-Nsr-c@seZdZddZejeefddZejfddZddZ d d Z d d Z d)ddZ d*ddZ ddZejjZZddZddZddZejjZeZefddZd+ddZedd Zd!d"Zd#d$Zed,d%d&Z d'd(Z!dS)-rcOs|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__rootrr-_OrderedDict__hardroot_proxyr.r/_OrderedDict__map_OrderedDict__update)argskwdsr&rootr r r!__init__`s    zOrderedDict.__init__c CsZ||krJ||j|<}|j}|j}||||_|_|_||_|||_||||dS)N)r8r5r.r/r+) r&r+valueZ dict_setitemrZLinklinkr<lastr r r! __setitem__ss zOrderedDict.__setitem__cCs>||||j|}|j}|j}||_||_d|_d|_dS)N)r8popr.r/)r&r+Z dict_delitemr? link_prev link_nextr r r! __delitem__s  zOrderedDict.__delitem__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r5r/r+)r&r<currr r r!__iter__s  zOrderedDict.__iter__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r5r.r+)r&r<rFr r r!r's  zOrderedDict.__reversed__cCs*|j}||_|_|jt|dS)N)r5r.r/r8cleardict)r&r<r r r!rHs  zOrderedDict.clearTcCsj|s td|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=t||}||fS)Nzdictionary is empty)KeyErrorr5r.r/r+r8rIrB)r&r@r<r?rCrDr+r>r r r!popitems  zOrderedDict.popitemc Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)N)r8r.r/r5) r&r+r@r?rCrDZ soft_linkr<firstr r r! move_to_ends$ zOrderedDict.move_to_endcCsVtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S)Nr2r)_sys getsizeofr4__dict__r8r6r5)r&Zsizeofnsizer r r! __sizeof__s  zOrderedDict.__sizeof__cCst|S)N)r#)r&r r r!keysszOrderedDict.keyscCst|S)N)r*)r&r r r!itemsszOrderedDict.itemscCst|S)N)r,)r&r r r!valuesszOrderedDict.valuescCs0||kr||}||=|S||jkr,t||S)N)_OrderedDict__markerrJ)r&r+defaultresultr r r!rBs zOrderedDict.popNcCs||kr||S|||<|S)Nr )r&r+rXr r r! setdefaultszOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|fS)Nz%s()z%s(%r)) __class__rlistrU)r&r r r!__repr__ szOrderedDict.__repr__cCsHt|}xttD]}||dqW|jd|p8ddt|fS)Nr )varscopyrrBr[iterrU)r&Z inst_dictkr r r! __reduce__s zOrderedDict.__reduce__cCs ||S)N)r[)r&r r r!r_szOrderedDict.copycCs |}x|D] }|||<q W|S)Nr )clsiterabler>r&r+r r r!fromkeyss  zOrderedDict.fromkeyscCs2t|tr&t||o$ttt||St||S)N) isinstancerrI__eq__allmap_eq)r&otherr r r!rg%s zOrderedDict.__eq__)T)T)N)N)"rr(r)r=rIrAr7r-rErGr'rHrKrMrSrMutableMappingupdater9rTrUrV__ne__objectrWrBrZ_recursive_reprr]rbr_ classmethodrergr r r r!rQs.          )rF)renamedefaultsmodulec sttrddttttt|}|rt}xNt D]B\}}| rtt |st| dst||krd||<| |qJWxR|gD]D}t|tk rtd| std|t |rtd|qWt}xND]F}| dr|std|||kr,td|| |qWi}|dk rt|}t|tkrjtd tttttt|}tttjttd d d d } ddddDdtjtd| d| d} d|d} t| | | d} d|d| d| _|dk r6|| _tfdd} d|d| j_fdd}d |d!|_fd"d#}d$d%}d&d'}x.| | j||||fD]}|d(|j|_qW|d| dd)||| | ||||d* }t }xlt D]`\}}y||\}}Wn4t!k rBt"|}d+|}||f||<YnXt#||d,||<qWt|tf|}|dkryt$d j%&d-d.}Wnt'tfk rYnX|dk r||_(|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'r2(z, css|]}|dVqdS)z=%rNr ).0rr r r! sznamedtuple..)zdef __new__(_cls, z): return _tuple_new(_cls, (z)) namedtuple_) _tuple_newr__new__zCreate new instance of cs2||}|kr.tddt||S)Nz Expected z arguments, got )r3r4)rcrdrY)_len num_fields tuple_newr r!_makes  znamedtuple.._makez Make a new z# object from a sequence or iterablecs.|t|j|}|r*tdt||S)NzGot unexpected field names: )rrirB ValueErrorr\)_selfr;rY) field_namesr r!_replacesznamedtuple.._replacez Return a new z2 object replacing specified fields with new valuescs|jj|S)N)r[r)r&)repr_fmtr r!r]sznamedtuple..__repr__cSstt|j|S)N)rzip_fields)r&r r r!_asdictsznamedtuple.._asdictcSst|S)N)tuple)r&r r r!__getnewargs__sz"namedtuple..__getnewargs__.r ) __doc__r1r_field_defaults_fields_defaultsrrrr]rrzAlias for field number )docr__main__))rfstrreplacesplitr\rirNinternset enumerate isidentifier _iskeyword startswithaddtyper3rrr4rIr$rreprjoinrexecr __defaults__rq__func__rr)_nt_itemgettersrJ _itemgetterproperty _getframe f_globalsgetrr()typenamerrrrsrtseenindexrfield_defaultsarg_lists namespacerrrr]rrmethodclass_namespacecacheitemgetter_objectrrYr )rrrrrr!r<s              cCs*|j}x|D]}||dd||<q WdS)Nr r2)r)mappingrdZ mapping_getelemr r r!_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||dS)Nz;descriptor '__init__' of 'Counter' object needs an argumentr2z$expected at most 1 arguments, got %d)r3r4superrr=rm)r:r;r&)r[r r!r=&s  zCounter.__init__cCsdS)Nr r )r&r+r r r! __missing__:szCounter.__missing__NcCs6|dkrt|tdddStj||tddS)Nr2T)r+reverse)r+)sortedrUr_heapqnlargest)r&rQr r r! most_common?s zCounter.most_commoncCsttt|S)N)_chain from_iterable_starmap_repeatrU)r&r r r!elementsLszCounter.elementscCs tddS)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)rcrdvr r r!redszCounter.fromkeyscs|s td|^}}t|dkr0tdt||r<|dnd}|dk rt|tjr|r|j}x8|D]\}}|||d||<qhWqtt| |n t |||r| |dS)Nz9descriptor 'update' of 'Counter' object needs an argumentr2z$expected at most 1 arguments, got %dr ) r3r4rfrMappingrrUrrrmr)r:r;r&rdself_getrcount)r[r r!rmks    zCounter.updatecOs|s td|^}}t|dkr0tdt||r<|dnd}|dk r|j}t|tjrxH|D]\}}||d|||<qdWn x|D]}||dd||<qW|r||dS)Nz;descriptor 'subtract' of 'Counter' object needs an argumentr2z$expected at most 1 arguments, got %dr )r3r4rrfrrrUsubtract)r:r;r&rdrrrr r r!rs   zCounter.subtractcCs ||S)N)r[)r&r r r!r_sz Counter.copycCs|jt|ffS)N)r[rI)r&r r r!rbszCounter.__reduce__cs||krt|dS)N)rrE)r&r)r[r r!rEszCounter.__delitem__cCs`|sd|jjSy&dtdj|}d|jj|fStk rZd|jjt|SXdS)Nz%s()z, z%r: %rz%s({%s})z {0}({1!r})) r[rrri__mod__rr3formatrI)r&rUr r r!r]s zCounter.__repr__cCsxt|tstSt}x0|D]$\}}|||}|dkr|||<qWx,|D] \}}||krP|dkrP|||<qPW|S)Nr )rfrNotImplementedrU)r&rkrYrrnewcountr r r!__add__s    zCounter.__add__cCs|t|tstSt}x0|D]$\}}|||}|dkr|||<qWx0|D]$\}}||krP|dkrPd|||<qPW|S)Nr )rfrrrU)r&rkrYrrrr r r!__sub__s   zCounter.__sub__cCst|tstSt}x<|D]0\}}||}||kr:|n|}|dkr|||<qWx,|D] \}}||kr\|dkr\|||<q\W|S)Nr )rfrrrU)r&rkrYrr other_countrr r r!__or__s   zCounter.__or__cCsVt|tstSt}x<|D]0\}}||}||kr:|n|}|dkr|||<qW|S)Nr )rfrrrU)r&rkrYrrrrr r r!__and__s  zCounter.__and__cCs0t}x$|D]\}}|dkr|||<qW|S)Nr )rrU)r&rYrrr r r!__pos__s  zCounter.__pos__cCs4t}x(|D]\}}|dkrd|||<qW|S)Nr )rrU)r&rYrrr r r!__neg__'s zCounter.__neg__cCs*dd|D}x|D] }||=qW|S)NcSsg|]\}}|dks|qS)r r )r|rrr r r! 4sz*Counter._keep_positive..)rU)r& nonpositiverr r r!_keep_positive2s  zCounter._keep_positivecCs.x$|D]\}}|||7<q W|S)N)rUr)r&rkrrr r r!__iadd__9s zCounter.__iadd__cCs.x$|D]\}}|||8<q W|S)N)rUr)r&rkrrr r r!__isub__Fs zCounter.__isub__cCs6x,|D] \}}||}||kr |||<q W|S)N)rUr)r&rkrrrr r r!__ior__Ss  zCounter.__ior__cCs6x,|D] \}}||}||kr |||<q W|S)N)rUr)r&rkrrrr r r!__iand__bs  zCounter.__iand__)N)N)rr(r)r=rrrrqrermrr_rbrEr]rrrrrrrrrrr __classcell__r r )r[r!rs.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)r\maps)r&rr r r!r=szChainMap.__init__cCs t|dS)N)rJ)r&r+r r r!rszChainMap.__missing__c Cs8x,|jD]"}y||Stk r(YqXqW||S)N)rrJr)r&r+rr r r! __getitem__s   zChainMap.__getitem__NcCs||kr||S|S)Nr )r&r+rXr r r!rsz ChainMap.getcCsttj|jS)N)r4runionr)r&r r r!__len__szChainMap.__len__cCs*i}xt|jD]}||qWt|S)N)r$rrmr`)r&drr r r!rGszChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr )r|m)r+r r!r}sz(ChainMap.__contains__..)anyr)r&r+r )r+r! __contains__szChainMap.__contains__cCs t|jS)N)rr)r&r r r!__bool__szChainMap.__bool__cCsd|dtt|jS)Nz{0.__class__.__name__}({1})z, )rrrirr)r&r r r!r]szChainMap.__repr__cGs|tj|f|S)N)rIre)rcrdr:r r r!reszChainMap.fromkeyscCs$|j|jdf|jddS)Nr r2)r[rr_)r&r r r!r_sz ChainMap.copycCs|dkr i}|j|f|jS)N)r[r)r&rr r r! new_childszChainMap.new_childcCs|j|jddS)Nr2)r[r)r&r r r!parentsszChainMap.parentscCs||jd|<dS)Nr )r)r&r+r>r r r!rAszChainMap.__setitem__cCs8y|jd|=Wn"tk r2td|YnXdS)Nr z(Key not found in the first mapping: {!r})rrJr)r&r+r r r!rEszChainMap.__delitem__cCs0y|jdStk r*tdYnXdS)Nr z#No keys found in the first mapping.)rrKrJ)r&r r r!rKszChainMap.popitemcGs>y|jdj|f|Stk r8td|YnXdS)Nr z(Key not found in the first mapping: {!r})rrBrJr)r&r+r:r r r!rBsz ChainMap.popcCs|jddS)Nr )rrH)r&r r r!rHszChainMap.clear)N)N)rr(r)r=rrrrrGrrrpr]rqrer___copy__rrrrArErKrBrHr r r r!r vs&    c@sjeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ e dddZdS)rcOs|s td|^}}t|dkr0tdt||r>|d}n0d|krj|d}ddl}|jdtddnd}i|_|dk r||t|r||dS) Nzrr+r r r!re#s  zUserDict.fromkeys)N)rr(r)r=rrrArErGrr]rr_rqrer r r r!rs c@seZdZd?ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#ZeZd$d%Zd&d'Zd(d)Zd*d+Zd@d-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!dS)ArNcCsbg|_|dk r^t|t|jkr0||jdd<n.t|trT|jdd|jdd<n t||_dS)N)rrrfrr\)r&initlistr r r!r=2s zUserList.__init__cCs t|jS)N)rr)r&r r r!r]<rzUserList.__repr__cCs|j||kS)N)r_UserList__cast)r&rkr r r!__lt__=rzUserList.__lt__cCs|j||kS)N)rr)r&rkr r r!__le__>rzUserList.__le__cCs|j||kS)N)rr)r&rkr r r!rg?rzUserList.__eq__cCs|j||kS)N)rr)r&rkr r r!__gt__@rzUserList.__gt__cCs|j||kS)N)rr)r&rkr r r!__ge__ArzUserList.__ge__cCst|tr|jS|S)N)rfrr)r&rkr r r!__castBszUserList.__castcCs ||jkS)N)r)r&rr r r!rDrzUserList.__contains__cCs t|jS)N)r4r)r&r r r!rErzUserList.__len__cCs(t|tr||j|S|j|SdS)N)rfslicer[r)r&ir r r!rFs zUserList.__getitem__cCs||j|<dS)N)r)r&rrr r r!rAKrzUserList.__setitem__cCs |j|=dS)N)r)r&rr r r!rELrzUserList.__delitem__cCsPt|tr||j|jSt|t|jr<||j|S||jt|S)N)rfrr[rrr\)r&rkr r r!rMs  zUserList.__add__cCsPt|tr||j|jSt|t|jr<|||jS|t||jS)N)rfrr[rrr\)r&rkr r r!__radd__Ss  zUserList.__radd__cCsRt|tr|j|j7_n2t|t|jr<|j|7_n|jt|7_|S)N)rfrrrr\)r&rkr r r!rYs  zUserList.__iadd__cCs||j|S)N)r[r)r&rQr r r!__mul__aszUserList.__mul__cCs|j|9_|S)N)r)r&rQr r r!__imul__dszUserList.__imul__cCs8|j|j}|j|j|jddd|jd<|S)Nr)r[rrPrm)r&rr r r!rgszUserList.__copy__cCs|j|dS)N)rappend)r&rr r r!rmrzUserList.appendcCs|j||dS)N)rinsert)r&rrr r r!rnrzUserList.insertrzcCs |j|S)N)rrB)r&rr r r!rBorz UserList.popcCs|j|dS)N)rremove)r&rr r r!rprzUserList.removecCs|jdS)N)rrH)r&r r r!rHqrzUserList.clearcCs ||S)N)r[)r&r r r!r_rrz UserList.copycCs |j|S)N)rr)r&rr r r!rsrzUserList.countcGs|jj|f|S)N)rr)r&rr:r r r!rtrzUserList.indexcCs|jdS)N)rr)r&r r r!rurzUserList.reversecOs|jj||dS)N)rsort)r&r:r;r r r!rvrz UserList.sortcCs*t|tr|j|jn |j|dS)N)rfrrextend)r&rkr r r!rws zUserList.extend)N)rz)"rr(r)r=r]rrrgrrrrrrrArErrrr__rmul__rrrrrBrrHr_rrrrrr r r r!r0s>  c@sheZdZddZddZddZddZd 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_Z3d`daZ4ddbdcZ5e6j7Z7dddeZ8ddgdhZ9d1ejfdidjZ:d1ejfdkdlZ;dmdnZddsdtZ?ddudvZ@ddxdyZAd1ejfdzd{ZBdd|d}ZCd~dZDddZEddZFddZGddZHd4S)rcCs<t|tr||_n&t|tr.|jdd|_n t||_dS)N)rfrrr)r&seqr r r!r=s   zUserString.__init__cCs t|jS)N)rr)r&r r r!__str__rzUserString.__str__cCs t|jS)N)rr)r&r r r!r]rzUserString.__repr__cCs t|jS)N)intr)r&r r r!__int__rzUserString.__int__cCs t|jS)N)floatr)r&r r r! __float__rzUserString.__float__cCs t|jS)N)complexr)r&r r r! __complex__rzUserString.__complex__cCs t|jS)N)hashr)r&r r r!__hash__rzUserString.__hash__cCs|jddfS)N)r)r&r r r!rszUserString.__getnewargs__cCs t|tr|j|jkS|j|kS)N)rfrr)r&stringr r r!rgs  zUserString.__eq__cCs t|tr|j|jkS|j|kS)N)rfrr)r&rr r r!rs  zUserString.__lt__cCs t|tr|j|jkS|j|kS)N)rfrr)r&rr r r!rs  zUserString.__le__cCs t|tr|j|jkS|j|kS)N)rfrr)r&rr r r!rs  zUserString.__gt__cCs t|tr|j|jkS|j|kS)N)rfrr)r&rr r r!rs  zUserString.__ge__cCst|tr|j}||jkS)N)rfrr)r&charr r r!rs zUserString.__contains__cCs t|jS)N)r4r)r&r r r!rrzUserString.__len__cCs||j|S)N)r[r)r&rr r r!rrzUserString.__getitem__cCsJt|tr||j|jSt|tr6||j|S||jt|S)N)rfrr[rr)r&rkr r r!rs   zUserString.__add__cCs.t|tr|||jS|t||jS)N)rfrr[r)r&rkr r r!rs zUserString.__radd__cCs||j|S)N)r[r)r&rQr r r!rszUserString.__mul__cCs||j|S)N)r[r)r&r:r r r!rszUserString.__mod__cCs||tS)N)r[r:)r&rr r r!__rmod__szUserString.__rmod__cCs||jS)N)r[r capitalize)r&r r r!rrzUserString.capitalizecCs||jS)N)r[rcasefold)r&r r r!rszUserString.casefoldcGs||jj|f|S)N)r[rcenter)r&widthr:r r r!rszUserString.centerr cCs t|tr|j}|j|||S)N)rfrrr)r&substartendr r r!rs zUserString.countNcCs>|r.|r||j||S||j|S||jS)N)r[rencode)r&encodingerrorsr r r!rs zUserString.encodecCs|j|||S)N)rendswith)r&suffixrrr r r!rszUserString.endswithcCs||j|S)N)r[r expandtabs)r&tabsizer r r!rszUserString.expandtabscCs t|tr|j}|j|||S)N)rfrrfind)r&rrrr r r!r s zUserString.findcOs|jj||S)N)rr)r&r:r;r r r!rszUserString.formatcCs |j|S)N)r format_map)r&rr r r!r!szUserString.format_mapcCs|j|||S)N)rr)r&rrrr r r!rszUserString.indexcCs |jS)N)risalpha)r&r r r!r"rzUserString.isalphacCs |jS)N)risalnum)r&r r r!r#rzUserString.isalnumcCs |jS)N)risascii)r&r r r!r$rzUserString.isasciicCs |jS)N)r isdecimal)r&r r r!r%rzUserString.isdecimalcCs |jS)N)risdigit)r&r r r!r&rzUserString.isdigitcCs |jS)N)rr)r&r r r!rrzUserString.isidentifiercCs |jS)N)rislower)r&r r r!r'rzUserString.islowercCs |jS)N)r isnumeric)r&r r r!r(rzUserString.isnumericcCs |jS)N)r isprintable)r&r r r!r)rzUserString.isprintablecCs |jS)N)risspace)r&r r r!r*rzUserString.isspacecCs |jS)N)ristitle)r&r r r!r+rzUserString.istitlecCs |jS)N)risupper)r&r r r!r,rzUserString.isuppercCs |j|S)N)rr)r&rr r r!rrzUserString.joincGs||jj|f|S)N)r[rljust)r&rr:r r r!r-szUserString.ljustcCs||jS)N)r[rlower)r&r r r!r.rzUserString.lowercCs||j|S)N)r[rlstrip)r&charsr r r!r/rzUserString.lstripcCs |j|S)N)r partition)r&sepr r r!r1szUserString.partitionrzcCs6t|tr|j}t|tr |j}||j|||S)N)rfrrr[r)r&oldnewmaxsplitr r r!rs   zUserString.replacecCs t|tr|j}|j|||S)N)rfrrrfind)r&rrrr r r!r6s zUserString.rfindcCs|j|||S)N)rrindex)r&rrrr r r!r7szUserString.rindexcGs||jj|f|S)N)r[rrjust)r&rr:r r r!r8szUserString.rjustcCs |j|S)N)r rpartition)r&r2r r r!r9szUserString.rpartitioncCs||j|S)N)r[rrstrip)r&r0r r r!r:szUserString.rstripcCs|j||S)N)rr)r&r2r5r r r!rszUserString.splitcCs|j||S)N)rrsplit)r&r2r5r r r!r;szUserString.rsplitFcCs |j|S)N)r splitlines)r&keependsr r r!r< rzUserString.splitlinescCs|j|||S)N)rr)r&prefixrrr r r!r szUserString.startswithcCs||j|S)N)r[rstrip)r&r0r r r!r? rzUserString.stripcCs||jS)N)r[rswapcase)r&r r r!r@rzUserString.swapcasecCs||jS)N)r[rtitle)r&r r r!rArzUserString.titlecGs||jj|S)N)r[r translate)r&r:r r r!rBszUserString.translatecCs||jS)N)r[rupper)r&r r r!rCrzUserString.uppercCs||j|S)N)r[rzfill)r&rr r r!rDrzUserString.zfill)NN)r)N)rz)N)Nrz)Nrz)F)N)Irr(r)r=rr]rr r r rrgrrrrrrrrrrrrrrrrrNmaxsizerrrrr rr!rr"r#r$r%r&rr'r(r)r*r+r,rr-r.r/r maketransr1rr6r7r8r9r:rr;r<rr?r@rArBrCrDr r r r!rs         )6rroperatorr rr rjkeywordr rsysrNheapqr_weakrefrr7 itertoolsrrrrrrreprlibrrp _collectionsr ImportErrorMutableSequenceregisterrr"KeysViewr# ItemsViewr* ValuesViewr,ror-rIrrrrrrlr rrSequencerr r r r!sZ      _-oKS