Package twisted :: Package flow :: Module wrap :: Class _Iterable
[show private | hide private]
[frames | no frames]

Class _Iterable

Instruction --+    
              |    
          Stage --+
                  |
                 _Iterable


Wrapper for iterable objects, pass in a next() function

This wraps functions (or bound methods). Execution starts with the initial function. If the return value is a Stage, then control passes on to that stage for the next round of execution. If the return value is Cooperate, then the chain of Stages is put on hold, and this return value travels all the way up the call stack so that the underlying mechanism can sleep, or perform other tasks, etc. All other non-Instruction return values, Failure objects included, are passed back to the previous stage via self.result

All exceptions signal the end of the Stage. StopIteration means to stop without providing a result, while all other exceptions provide a Failure self.result followed by stoppage.
Method Summary
  __init__(self, iterable, *trap)
  __iter__(self)
(inherited from Stage)
  next(self)
return current result (inherited from Stage)
  _yield(self)
executed during a yield statement

Method Details

_yield(self)

executed during a yield statement

Generated by Epydoc 1.1 on Fri Jun 27 03:49:21 2003 http://epydoc.sf.net