PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  VLc@sqdZddlZddlmZdgZdefdYZdefdYZdefd YZdS( s Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context. Use like:: >>> for loop, item in looper(['a', 'b', 'c']): ... print loop.number, item ... if not loop.last: ... print '---' 1 a --- 2 b --- 3 c iN(t basestring_tloopercBs)eZdZdZdZdZRS(s Helper for looping (particularly in templates) Use this like:: for loop, item in looper(seq): if loop.first: ... cCs ||_dS(N(tseq(tselfR((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt__init__&scCs t|jS(N(t looper_iterR(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt__iter__)scCsd|jj|jfS(Ns <%s for %r>(t __class__t__name__R(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt__repr__,s(Rt __module__t__doc__RRR (((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyRs   RcBs;eZdZdZdZejdkr9eZnRS(cCst||_d|_dS(Ni(tlistRtpos(RR((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR3scCs|S(N((R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR7scCsY|jt|jkr!tnt|j|j|j|jf}|jd7_|S(Ni(R tlenRt StopIterationtloop_pos(Rtresult((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt__next__:s  %t3(RR RRRtsystversiontnext(((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR1s    RcBs%eZdZdZdZeeZdZeeZdZeeZdZeeZe j dkreZ ndZ ee Z dZ ee Z d ZeeZd ZeeZd ZeeZd ZeeZdd ZddZdZRS(cCs||_||_dS(N(RR (RRR ((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyRGs cCsd|j|j|jfS(Ns(RR (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR KscCs|jS(N(R (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytindexOscCs |jdS(Ni(R (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytnumberSscCs|j|jS(N(RR (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytitemWscCs/y|j|jdSWntk r*dSXdS(Ni(RR t IndexErrortNone(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR[s RcCs%|jdkrdS|j|jdS(Nii(R RR(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytpreviousescCs |jd S(Ni(R (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytoddkscCs |jdS(Ni(R (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytevenoscCs |jdkS(Ni(R (R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytfirstsscCs|jt|jdkS(Ni(R RR(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytlastwscCs t|jS(N(RR(R((s3/usr/lib/python2.7/site-packages/tempita/_looper.pytlength{scCs&|jr tS|j|j|j|S(s Returns true if this item is the start of a new group, where groups mean that some attribute has changed. The getter can be None (the item itself changes), an attribute name like ``'.attr'``, a function, or a dict key or list index. (RtTruet_compare_groupRR(Rtgetter((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt first_groups cCs&|jr tS|j|j|j|S(s Returns true if this item is the end of a new group, where groups mean that some attribute has changed. The getter can be None (the item itself changes), an attribute name like ``'.attr'``, a function, or a dict key or list index. (R R"R#RR(RR$((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyt last_groups cCs|dkr||kSt|tr|jdr|d}|jdry|d }t||t||kSt||t||kSn7t|dr||||kS||||kSdS(Nt.is()it__call__(Rt isinstanceRt startswithtendswithtgetattrthasattr(RRtotherR$((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyR#s    "N(RR RR RtpropertyRRRRRRRRRRR R!RR%R&R#(((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyREs6                        ( R Rttempita.compat3Rt__all__tobjectRRR(((s3/usr/lib/python2.7/site-packages/tempita/_looper.pyts