| Home | Trees | Indices | Help |
|
|---|
|
|
A simple generator contains another, possibly complex generator statement.
Usefull when breaking things apart for reuse.
To use, simply create a class that contains a _generator:
class MySimpleGenerator(SimpleGenerator):
def __init__(self, group = None):
SimpleGenerator.__init__(self, group)
self._generator = GeneratorList(None, [
Static('AAA'),
Repeater(None, Static('A'), 1, 100)
])
NOTE: Do not set group on you generators unless they will not be incremented
by self._generator.next().
@see: L{Generator}
|
|||
|
|||
|
|||
| string |
|
||
|
|||
|
Inherited from |
|||
|
|||
Base constructor, please call me!
|
Next value. OVERRIDE From Python docs on next(): The intention of the protocol is that once an iterator's next() method raises StopIteration, it will continue to do so on subsequent calls. Implementations that do not obey this property are deemed broken. (This constraint was added in Python 2.3; in Python 2.2, various iterators are broken according to this rule.) For Generators, please use the GeneratorCompleted exception instead of StopIteration (its a subclass).
|
Return raw value w/o passing through transformer if set. OVERRIDE
|
Called to reset the generator to its initial state. OVERRIDE
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Aug 16 12:17:14 2008 | http://epydoc.sourceforge.net |