Package wtf :: Package app :: Package services :: Module crash :: Class Iterator
[hide private]
[frames] | no frames]

Class Iterator

source code

object --+
         |
        Iterator

Result iterator with crash dumper
Instance Methods [hide private]
 
__init__(self, wrapped, crashservice, environ)
Initialization
source code
Iterator
__iter__(self)
Return iterator object (iterator protocol)
source code
any
next(self)
Return next item of the iterable (iterator protocol)
source code
int
__len__(self)
Determine the length of the iterable
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
CrashService _crash
Crash service instance
dict _environ
Request environment
bool _first
If True, _wrapped is actually a tuple, consisting of the first iterable item and the iterable itself
iterable _wrapped
The wrapped iterable
callable close
The iterable's close method (only if there's one)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, wrapped, crashservice, environ)
(Constructor)

source code 
Initialization
Parameters:
  • wrapped (iterable) - The iterable to wrap
  • crashservice (CrashService) - The crash service instance
  • environ (dict) - The request environment
Overrides: object.__init__

__iter__(self)

source code 
Return iterator object (iterator protocol)
Returns: Iterator
The iterator object

next(self)

source code 
Return next item of the iterable (iterator protocol)
Returns: any
The next item

__len__(self)
(Length operator)

source code 
Determine the length of the iterable
Returns: int
The length
Raises:
  • TypeError - The iterable is unsized