Qfp! ddlmZmZmZddlmZddlZgdZGddejjZ GddejjZ Gd d e Z Gd d e Zdd Zy))DEFAULT_PROTOCOLPickler Unpickler)BytesION)Shelf BsdDbShelfDbfilenameShelfopenc2eZdZ dZexZxZxZxZxZZ dZ y) _ClosedDictctd)Nz!invalid operation on closed shelf) ValueError)selfargss -/opt/alt/python312/lib64/python3.12/shelve.pyclosedz_ClosedDict.closedEs<==cy)Nzrs r__repr__z_ClosedDict.__repr__Is$rN) __name__ __module__ __qualname__r__iter____len__ __getitem__ __setitem__ __delitem__keysrrrrr r Bs-D>JPPHPwPP{P[4%rr cdeZdZ ddZdZdZdZddZdZdZ d Z d Z d Z d Z d ZdZy)rNcZ||_|t}||_||_i|_||_yN)dictr _protocol writebackcache keyencodingrr$protocolr&r(s r__init__zShelf.__init__Ts1  'H!" &rc#K|jjD]}|j|j!ywr#)r$r decoder()rks rrzShelf.__iter__^s0!A((4++, ,"s>Ac,t|jSr#)lenr$rs rrz Shelf.__len__bs499~rcP|j|j|jvSr#encoder(r$rkeys r __contains__zShelf.__contains__es zz$**+tyy88rc^|j|j|jvr||S|Sr#r2)rr5defaults rgetz Shelf.geths, ::d&& '499 49 rc |j|}|S#t$rit|j|j |j }t |j}|jr||j|<Y|SwxYwr#) r'KeyErrorrr$r3r(rloadr&rr5valuefs rrzShelf.__getitem__msz (JJsOE   ( #**T-=-=">?@AaL%%'E~~"' 3  (sA.BBc|jr||j|<t}t||j}|j ||j |j|j|j<yr#) r&r'rrr%dumpgetvaluer$r3r()rr5r>r?ps rrzShelf.__setitem__ws[ >>#DJJsO I At~~ & u 23**, #**T--./rc|j|j|j= |j|=y#t$rYywxYwr#)r$r3r(r'r;r4s rrzShelf.__delitem__s? IIcjj!1!12 3  3   s 6 AAc|Sr#rrs r __enter__zShelf.__enter__s rc$|jyr#)close)rtyper> tracebacks r__exit__zShelf.__exit__s  rc|jy |j |jj t |_y#t$rYwxYw#d|_YyxYw# t |_w#d|_YwxYwxYwr#)r$syncrHAttributeErrorr rs rrHz Shelf.closes{ 99   ! IIK  !  !'M "   !   !'M  !  sKA(A A AA(AA( A%(B*A:9B: BBc>t|dsy|jy)Nr&)hasattrrHrs r__del__z Shelf.__del__st[)  rc|jrH|jr>djj"DN"jj..0 U!S 1!DNDJ 499f % IINN  &rNFzutf-8r#)rrrr+rrr6r9rrrrFrKrHrQrMrrrrrMsP 7<$'-9 ?!"rrc8eZdZ ddZdZdZdZdZdZy) rNc6tj|||||yr#)rr+r)s rr+zBsdDbShelf.__init__s tT8Y Drc|jj|\}}t|}|j|jt |j fSr#)r$ set_locationrr-r(rr<r=s rrYzBsdDbShelf.set_locationsJyy--c2 e EN 4++,il.?.?.ABBrct|j\}}t|}|j|jt |j fSr#)nextr$rr-r(rr<r=s rr[zBsdDbShelf.nextsCDII e EN 4++,il.?.?.ABBrc|jj\}}t|}|j|jt |j fSr#)r$previousrr-r(rr<r=s rr]zBsdDbShelf.previoussHyy))+ e EN 4++,il.?.?.ABBrc|jj\}}t|}|j|jt |j fSr#)r$firstrr-r(rr<r=s rr_zBsdDbShelf.firstsFyy( e EN 4++,il.?.?.ABBrc|jj\}}t|}|j|jt |j fSr#)r$lastrr-r(rr<r=s rrazBsdDbShelf.lastsFyy~~' e EN 4++,il.?.?.ABBrrU) rrrr+rYr[r]r_rarrrrrs3 7<$EC C C C CrrceZdZ ddZy)r Nc\ddl}tj||j||||y)Nr)dbmrr+r )rfilenameflagr*r&rds rr+zDbfilenameShelf.__init__s" tSXXh5xKrcNF)rrrr+rrrr r s  Lrr c t||||Sr#)r )rerfr*r&s rr r s  8T8Y ??rrg)picklerrriorcollections.abc collections__all__abcMutableMappingr rrr r rrrrqsp8t87 <%+//00%_KOO * *_D(C(CV Le L @r