def __init__(self, iterable, recurse=None):
        self._iterator = iter(iterable)
        self._recurse = recurse
        self.index0 = -1

        # try to get the length of the iterable early.  This must be done
        # here because there are some broken iterators around where there
        # __len__ is the number of iterations left (i'm looking at your
        # listreverseiterator!).
        try:
            self._length = len(iterable)
        except (__HOLE__, AttributeError):
            self._length = None
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/jinja2-2.6/jinja2/runtime.py/LoopContext.__init__