ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@sUdZdgZdefdYZdefdYZdefdYZdS(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 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((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyt__init__"scCs t|jS(N(t looper_iterR(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyt__iter__%scCsd|jj|jfS(Ns <%s for %r>(t __class__t__name__R(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyt__repr__(s(Rt __module__t__doc__RRR(((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyRs   RcBs#eZdZdZdZRS(cCst||_d|_dS(Ni(tlistRtpos(RR((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyR.scCs|S(N((R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyR2scCsY|jt|jkr!tnt|j|j|j|jf}|jd7_|S(Ni(R tlenRt StopIterationtloop_pos(Rtresult((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytnext5s  %(RR RRR(((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyR,s  RcBs eZdZdZdZeeZdZeeZdZeeZdZeeZdZ ee Z dZ ee Z dZ ee Z d Z ee Z d Z ee Z d ZeeZdd Zdd ZdZRS(cCs||_||_dS(N(RR (RRR ((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyR>s cCsd|jttfS(Ns(RR (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyRBscCs|jS(N(R (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytindexFscCs |jdS(Ni(R (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytnumberJscCs|j|jS(N(RR (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytitemNscCs/y|j|jdSWntk r*dSXdS(Ni(RR t IndexErrortNone(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyRRs cCs%|jdkrdS|j|jdS(Nii(R RR(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytpreviousYscCs |jd S(Ni(R (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytodd_scCs |jdS(Ni(R (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytevencscCs |jdkS(Ni(R (R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytfirstgscCs|jt|jdkS(Ni(R R R(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytlastkscCs t|jS(N(R R(R((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pytlengthoscCs&|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((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyt first_groupss 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. (RRRRR(RR((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyt last_group~s cCs|dkr||kSt|tr|jdr|d}|jdry|d }t||t||kSt||t||kSn4t|r||||kS||||kSdS(Nt.is()i(Rt isinstancet basestringt startswithtendswithtgetattrtcallable(RRtotherR((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyRs    " N(RR RRRtpropertyRRRRRRRRRRR R!R(((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyR<s2                       N(R t__all__tobjectRRR(((sJ/opt/alt/python27/lib/python2.7/site-packages/paste/util/looper/_looper.pyts