grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jp!ã@sˆ ddlmZmZmZddlmZddlZgd¢ZGdd„dej j ƒZ Gdd„dej j ƒZ Gd d „d e ƒZ Gd d „d e ƒZddd„ZdS)é)ÚDEFAULT_PROTOCOLÚPicklerÚ Unpickler)ÚBytesION)ÚShelfÚ BsdDbShelfÚDbfilenameShelfÚopenc@s6eZdZ dd„ZeZZZZZZ dd„Z dS)Ú _ClosedDictcGstdƒ‚)Nz!invalid operation on closed shelf)Ú ValueError)ÚselfÚargs©rú-/opt/alt/python310/lib64/python3.10/shelve.pyÚclosedEsz_ClosedDict.closedcCsdS)Nzr©r rrrÚ__repr__Ióz_ClosedDict.__repr__N) Ú__name__Ú __module__Ú __qualname__rÚ__iter__Ú__len__Ú __getitem__Ú __setitem__Ú __delitem__Úkeysrrrrrr Bs  r c@s~eZdZ  ddd„Zdd„Zdd „Zd d „Zdd d „Zdd„Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„ZdS) rNFúutf-8cCs.||_|dur t}||_||_i|_||_dS©N)ÚdictrÚ _protocolÚ writebackÚcacheÚ keyencoding©r rÚprotocolr!r#rrrÚ__init__Ts zShelf.__init__ccs$�|j ¡D] }| |j¡VqdSr)rrÚdecoder#)r Úkrrrr^s€ÿzShelf.__iter__cCs t|jƒSr)Úlenrrrrrrbs z Shelf.__len__cCs| |j¡|jvSr©Úencoder#r©r ÚkeyrrrÚ __contains__eszShelf.__contains__cCs| |j¡|jvr ||S|Srr*)r r-ÚdefaultrrrÚgethsz Shelf.getcCs^z|j|}W|Sty.t|j| |j¡ƒ}t|ƒ ¡}|jr+||j|<Y|SY|Swr) r"ÚKeyErrorrrr+r#rÚloadr!©r r-ÚvalueÚfrrrrms  û  þûzShelf.__getitem__cCsF|jr||j|<tƒ}t||jƒ}| |¡| ¡|j| |j ¡<dSr) r!r"rrr ÚdumpÚgetvaluerr+r#)r r-r4r5Úprrrrws    zShelf.__setitem__cCs4|j| |j¡=z|j|=WdStyYdSwr)rr+r#r"r1r,rrrrs  ÿzShelf.__delitem__cCs|SrrrrrrÚ __enter__†rzShelf.__enter__cCs | ¡dSr)Úclose)r Útyper4Ú tracebackrrrÚ__exit__‰s zShelf.__exit__c Cs||jdurdSz'| ¡z|j ¡Wn tyYnwWztƒ|_WdSd|_YdSztƒ|_Wwd|_Ywr)rÚsyncr:ÚAttributeErrorr rrrrr:Œs$  ÿ€ ý  z Shelf.closecCst|dƒsdS| ¡dS)Nr!)Úhasattrr:rrrrÚ__del__�s  z Shelf.__del__cCsX|jr|jrd|_|j ¡D]\}}|||<qd|_i|_t|jdƒr*|j ¡dSdS)NFTr>)r!r"Úitemsr@rr>)r r-Úentryrrrr>¤s   ÿz Shelf.sync©NFrr)rrrr&rrr.r0rrrr9r=r:rAr>rrrrrMs" ÿ    rc@sDeZdZ  ddd„Zdd„Zdd „Zd d „Zd d „Zdd„ZdS)rNFrcCst |||||¡dSr)rr&r$rrrr&¼szBsdDbShelf.__init__cCs0|j |¡\}}t|ƒ}| |j¡t|ƒ ¡fSr)rÚ set_locationrr'r#rr2r3rrrrEÀszBsdDbShelf.set_locationcCs.t|jƒ\}}t|ƒ}| |j¡t|ƒ ¡fSr)Únextrrr'r#rr2r3rrrrFÅózBsdDbShelf.nextcCó.|j ¡\}}t|ƒ}| |j¡t|ƒ ¡fSr)rÚpreviousrr'r#rr2r3rrrrIÊrGzBsdDbShelf.previouscCrHr)rÚfirstrr'r#rr2r3rrrrJÏrGzBsdDbShelf.firstcCrHr)rÚlastrr'r#rr2r3rrrrKÔrGzBsdDbShelf.lastrD) rrrr&rErFrIrJrKrrrrr¯s  ÿ rc@seZdZ ddd„ZdS)rÚcNFcCs$ddl}t || ||¡||¡dS)Nr)Údbmrr&r )r ÚfilenameÚflagr%r!rMrrrr&ászDbfilenameShelf.__init__©rLNF)rrrr&rrrrrÚsrrLFcCs t||||ƒSr)r)rNrOr%r!rrrr æs r rP)ÚpicklerrrÚiorZcollections.abcÚ collectionsÚ__all__ÚabcÚMutableMappingr rrrr rrrrÚs:  b+