mò :ã¸Ec@södZdklZdklZlZlZlZdkl Z l Z l Z l Z dk lZlZlZlZdklZlZlZlZdklZlZlZlZdklZlZedƒ\Z Z!Z"hee!e#f<ee!e#f<ee!e#f<e e!e#f<ee!e#f<ee"e#f<ee"e#f<ee"e#f<e e"e#f<ee"e#f<ee!e$f<ee!e$f<ee!e$f<e e!e$f<ee!e$f<ee"e$f<ee"e$f<ee"e$f<e e"e$f<ee"e$f|i} g}| |dddfg}x|o|iƒ\} }}}}t | ƒ\} }| t jot | |ƒ\}}} |tjo©t| ƒ}x%tt| ƒdddƒD]x} ||}}| |djo|| }n| djo|| d}n|i| | || g| ||fƒq¹WnŒ|tjon{|tjpt‚| djpt‚tt| ƒƒ} | i|ƒ|i| |dg| ||fƒg}| g} |i | ||||| ||ƒq*| t!jpt‚t"| |ƒ\}}|i$| |||||||ƒq*WdS(Niiÿÿÿÿi(%R%RR(RtstacktpopR)R*R+RtkindRt TYPE_BTREERtbkindRRRR RtrangeRtnewlotnewhiRR RR t _btree2bucketRtbuckett __setstate__R,t TYPE_BUCKETRRR-(R%R*R4RR)RR+R(R.R0RRRR7R2RRR5((Rtwalks\      /  #    (R!t __module__R&R,R-R:(((RR$ßs   tCheckercBs>tZd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCsti||ƒg|_dS(N(R$R&R%Rterrors(R%R((RR&FscCs`|iƒ|ioHdt|iƒ}|iid|ƒdi|iƒ}t|ƒ‚ndS(NsErrors found in %s:is ( R%R:R=R#RtstinserttjoinR (R%R>((RtcheckJs   c Cs|i|||||ƒdS(N(R%t check_sortedRR(RR*R+( R%RR(R)RRRR*R+((RR,Rsc Cs|i|||||ƒdS(N(R%RBRR(RR*R+( R%RR(R)RRRR*R+((RR-Vsc Csdt|ƒ}}x|D]ú} |dj o8|| j o*d| ||f}|i |||ƒn|dj o8| |j o*d| ||f}|i |||ƒn||djoO| ||dj o9d| |||d|df}|i |||ƒn|d7}qWdS(Nis#key %r < lower bound %r at index %ds$key %r >= upper bound %r at index %dis(key %r at index %d >= key %r at index %d( R RRRRR*RR>R%tcomplainRR(R+( R%RR(RR*R+RRR>R((RRBZs'"cCs?d|t|ƒditt|ƒƒf}|i i |ƒdS(Ns%s, in %s, path from root %st.( tmsgR#RR@tmaptstrR(R>R%R=R(R%RERR(R>((RRCis+(R!R;R&RAR,R-RBRC(((RR<Es      tPrintercBs,tZd„Zd„Zd„Zd„ZRS(NcCsti||ƒdS(N(R$R&R%R(R%R((RR&qscCs|iƒdS(N(R%R:(R%((Rtdisplaytsc CsŠdt|ƒ} d| ditt|ƒƒt|ƒt|ƒfGH| d7} t|ƒ} x*t | ƒD]} d| | || fGHqfWdS(Ns s%s%s %s with %d childrenRDs %skey %d: %r( R R(tindentR@RFRGR#RRRRR3R( R%RR(R)RRRR*R+RRRJ((RR,ws3   c Cs¤dt|ƒ} d| ditt|ƒƒt|ƒt|ƒfGH| d7} t|ƒ} xDt | ƒD]6} d| | || fG|od|| fGHqfqfWdS(Ns s%s%s %s with %d keysRDs %skey %d: %rsvalue %r(R R(RJR@RFRGR#RRRR3RRR( R%RR(R)RRRR*R+RRRJ((RR-„s3   (R!R;R&RIR,R-(((RRHps   cCst|ƒiƒdS(s Check internal value-based invariants in a BTree or TreeSet. The btree._check() method checks internal C-level pointer consistency. The check() function here checks value-based invariants: whether the keys in leaf bucket and internal nodes are in strictly increasing order, and whether they all lie in their expected range. The latter is a subtle invariant that can't be checked locally -- it requires propagating range info down from the root of the tree, and modifying it at each level for each child. Raises AssertionError if anything is wrong, with a string detail explaining the problems. The entire tree is checked before AssertionError is raised, and the string detail may be large (depending on how much went wrong). N(R<tbtreeRA(RK((RRA“scCst|ƒiƒdS(sBDisplay the internal structure of a BTree, Bucket, TreeSet or Set.N(RHRKRI(RK((RRI¦sN(3t__doc__ttypesR tBTrees.OOBTreetOOBTreetOOBuckettOOSett OOTreeSettBTrees.OIBTreetOIBTreetOIBuckettOISett OITreeSettBTrees.IOBTreetIOBTreetIOBuckettIOSett IOTreeSettBTrees.IIBTreetIIBTreetIIBuckettIISett IITreeSettBTrees.IFBTreetIFBTreetIFBuckettIFSett IFTreeSett ZODB.utilsR"RR3t TYPE_UNKNOWNR1R9tTruetFalseRRR RRR6RRR#R$R<RHRARI((R\R[ReR1RZR<RR_RARQRORRRPR`R#RWRfRRhRRYRRRHRcRR$R RUR6RdR^RTR9RaR"RVRR RI((Rt?!s* ÿ3 (` 7  f+#