³ò ¬Z]Gc@s`dZddgZddkZddklZddd„ƒYZd„ZeƒZeiZdS( sGRedo the builtin repr() (representation) but with limits on most sizes.tReprtrepriÿÿÿÿN(tislicecBs‰eZd„Zd„Zd„Zdd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„ZRS(cCsgd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ dS(Niiiii(i( tmaxleveltmaxtupletmaxlisttmaxarraytmaxdicttmaxsett maxfrozensettmaxdequet maxstringtmaxlongtmaxother(tself((srepr.pyct__init__ s          cCs|i||iƒS(N(trepr1R(Rtx((srepr.pycRscCsòt|ƒi}d|jo|iƒ}di|ƒ}nt|d|ƒot|d|ƒ||ƒSn‚ti|ƒ}t|ƒ|i joXt d|i ddƒ}t d|i d|ƒ}|| d|t|ƒ|}n|SdS(Nt t_trepr_iiis...( ttypet__name__tsplittjointhasattrtgetattrt __builtin__RtlenR tmax(RRtlevelttypenametpartststitj((srepr.pycRs  $tcCsÐt|ƒ}|djo|o d}n–|d} |i} g} t||ƒD]} | | | | ƒqQ~ } ||jo| idƒndi| ƒ}|djo|o||}nd|||fS(Nis...is, s%s%s%s(RRRtappendR(RRRtlefttrighttmaxiterttrailtnR!tnewlevelRt_[1]telemtpieces((srepr.pyct_repr_iterable)s    3 cCs|i||dd|idƒS(Nt(t)t,(R/R(RRR((srepr.pyct repr_tuple6scCs|i||dd|iƒS(Nt[t](R/R(RRR((srepr.pyct repr_list9scCs)d|i}|i|||d|iƒS(Ns array('%s', [s])(ttypecodeR/R(RRRtheader((srepr.pyct repr_array<s cCs(t|ƒ}|i||dd|iƒS(Nsset([s])(t_possibly_sortedR/R(RRR((srepr.pyctrepr_set@s cCs(t|ƒ}|i||dd|iƒS(Ns frozenset([s])(R:R/R (RRR((srepr.pyctrepr_frozensetDs cCs|i||dd|iƒS(Nsdeque([s])(R/R (RRR((srepr.pyct repr_dequeIsc Csæt|ƒ}|djodSn|djodSn|d}|i}g}xYtt|ƒ|iƒD]?}|||ƒ}||||ƒ} |id|| fƒqhW||ijo|idƒndi|ƒ} d| fS( Nis{}s{...}is%s: %ss...s, s{%s}(RRRR:RR%R( RRRR*R+RR.tkeytkeyreprtvalreprR!((srepr.pyct repr_dictLs"     cCs­ti||i ƒ}t|ƒ|ijo}td|iddƒ}td|id|ƒ}ti|| |t|ƒ|ƒ}|| d|t|ƒ|}n|S(Niiis...(RRR RR(RRRR!R"R#((srepr.pyctrepr_str[s%$cCsti|ƒ}t|ƒ|ijoXtd|iddƒ}td|id|ƒ}|| d|t|ƒ|}n|S(Niiis...(RRRR R(RRRR!R"R#((srepr.pyct repr_longds $cCsµyti|ƒ}Wn-tj o!d|iit|ƒfSnXt|ƒ|ijoXtd|iddƒ}td|id|ƒ}|| d|t|ƒ|}n|S(Ns<%s instance at %x>iiis...( RRt Exceptiont __class__RtidRR R(RRRR!R"R#((srepr.pyct repr_instancels$(Rt __module__RRRR/R3R6R9R;R<R=RARBRCRG(((srepr.pycRs          cCs2yt|ƒSWntj ot|ƒSnXdS(N(tsortedRDtlist(R((srepr.pycR:zs(( t__doc__t__all__Rt itertoolsRRR:taReprR(((srepr.pycss  r