(self, iterable, undefined, recurse=None, depth0=0)
| 421 | class LoopContext(LoopContextBase): |
| 422 | |
| 423 | def __init__(self, iterable, undefined, recurse=None, depth0=0): |
| 424 | LoopContextBase.__init__(self, undefined, recurse, depth0) |
| 425 | self._iterator = iter(iterable) |
| 426 | |
| 427 | # try to get the length of the iterable early. This must be done |
| 428 | # here because there are some broken iterators around where there |
| 429 | # __len__ is the number of iterations left (i'm looking at your |
| 430 | # listreverseiterator!). |
| 431 | try: |
| 432 | self._length = len(iterable) |
| 433 | except (TypeError, AttributeError): |
| 434 | self._length = None |
| 435 | self._after = self._safe_next() |
| 436 | |
| 437 | @property |
| 438 | def length(self): |
nothing calls this directly
no test coverage detected