Your IP : 216.73.216.213
Z��ZH � @ sq d Z d d l Z d d l m Z d g Z Gd d � d e � Z Gd d � d e � Z Gd d � d e � Z d S)
a
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
� N)�basestring_�looperc @ s: e Z d Z d Z d d � Z d d � Z d d � Z d S) r z�
Helper for looping (particularly in templates)
Use this like::
for loop, item in looper(seq):
if loop.first:
...
c C s
| | _ d S)N)�seq)�selfr � r �I/opt/alt/python35/lib64/python3.5/site-packages/Cython/Tempita/_looper.py�__init__&