Vcp! ddlmZmZmZddlmZddlZgdZGddej j Z Gddej j Z Gd d e Z Gd d e ZddZdS))DEFAULT_PROTOCOLPickler Unpickler)BytesION)Shelf BsdDbShelfDbfilenameShelfopenc4eZdZ dZexZxZxZxZxZZ dZ dS) _ClosedDictc td)Nz!invalid operation on closed shelf) ValueError)selfargss /usr/lib64/python3.11/shelve.pyclosedz_ClosedDict.closedEs<===cdS)Nzrs r__repr__z_ClosedDict.__repr__Is$$rN) __name__ __module__ __qualname__r__iter____len__ __getitem__ __setitem__ __delitem__keysrrrrr r BsSD>>>JPPHPwPP{P[4%%%%%rr cfeZdZ ddZdZdZdZddZd Zd Z d Z d Z d Z dZ dZdZdS)rNFutf-8c^||_|t}||_||_i|_||_dSN)dictr _protocol writebackcache keyencodingrr%protocolr'r)s r__init__zShelf.__init__Ts9  ('H!" &rc#zK|jD]}||jVdSr$)r%r decoder))rks rrzShelf.__iter__^sI!! - -A((4+,, , , , , - -rc*t|jSr$)lenr%rs rrz Shelf.__len__bs49~~rcD||j|jvSr$encoder)r%rkeys r __contains__zShelf.__contains__eszz$*++ty88rcX||j|jvr||S|Sr$r3)rr6defaults rgetz Shelf.geths/ ::d& ' '49 4 9 rc  |j|}nt#t$rgt|j||j}t |}|jr ||j|<YnwxYw|Sr$) r(KeyErrorrr%r4r)rloadr'rr6valuefs rrzShelf.__getitem__ms (JsOEE ( ( ( #**T-=">">?@@AaLL%%''E~ ("' 3  (  s A.BBc|jr ||j|<t}t||j}||||j||j <dSr$) r'r(rrr&dumpgetvaluer%r4r))rr6r?r@ps rrzShelf.__setitem__wsi > $#DJsO II At~ & & u 23**,, #**T-..///rcz|j||j= |j|=dS#t$rYdSwxYwr$)r%r4r)r(r<r5s rrzShelf.__delitem__sO Icjj!122 3  3    DD s , ::c|Sr$rrs r __enter__zShelf.__enter__s rc.|dSr$)close)rtyper? tracebacks r__exit__zShelf.__exit__s rc,|jdS | |jn#t$rYnwxYw t |_dS#d|_YdSxYw# t |_w#d|_YwxYwxYwr$)r%syncrIAttributeErrorr rs rrIz Shelf.closes 9  F ! IIKKK  !!!!!      !'MM  !   !'MM  !  sOA/:A/ AA/AA/ A A,/B1BB BBcRt|dsdS|dS)Nr')hasattrrIrs r__del__z Shelf.__del__s,t[))  F rc|jr@|jr9d|_|jD] \}}|||< d|_i|_t|jdr|jdSdS)NFTrN)r'r(itemsrQr%rN)rr6entrys rrNz Shelf.syncs > dj "DN"j..00 " " U!S !DNDJ 49f % %  INN       rNFr"r$)rrrr,rrr7r:rrrrGrLrIrRrNrrrrrMs 7<$''''---999 ???!!!"rrc:eZdZ d dZdZdZdZdZd ZdS) rNFr"cBt|||||dSr$)rr,r*s rr,zBsdDbShelf.__init__s" tT8Y DDDDDrc|j|\}}t|}||jt |fSr$)r% set_locationrr.r)rr=r>s rrZzBsdDbShelf.set_locationsRy--c22 e ENN 4+,,ill.?.?.A.ABBrct|j\}}t|}||jt |fSr$)nextr%rr.r)rr=r>s rr\zBsdDbShelf.nextsJDI e ENN 4+,,ill.?.?.A.ABBrc|j\}}t|}||jt |fSr$)r%previousrr.r)rr=r>s rr^zBsdDbShelf.previoussPy))++ e ENN 4+,,ill.?.?.A.ABBrc|j\}}t|}||jt |fSr$)r%firstrr.r)rr=r>s rr`zBsdDbShelf.firstsNy(( e ENN 4+,,ill.?.?.A.ABBrc|j\}}t|}||jt |fSr$)r%lastrr.r)rr=r>s rrbzBsdDbShelf.lastsNy~~'' e ENN 4+,,ill.?.?.A.ABBrrV) rrrr,rZr\r^r`rbrrrrrs 7<$EEEECCC CCC CCC CCC CCCCCrrceZdZ ddZdS)r cNFcpddl}t||||||dS)Nr)dbmrr,r )rfilenameflagr+r'rfs rr,zDbfilenameShelf.__init__s7  tSXXh55xKKKKKrrdNF)rrrr,rrrr r s3 LLLLLLrr rdFc( t||||Sr$)r )rgrhr+r's rr r s  8T8Y ? ??rri)picklerrriorcollections.abc collections__all__abcMutableMappingr rrr r rrrrrsD8t8777777777 < < <%%%%%+/0%%%_____KO *___D(C(C(C(C(C(C(C(CV L L L L Le L L L @ @ @ @ @ @r