Peach :: group :: GroupForeachDo :: Class GroupForeachDo
[hide private]

Class GroupForeachDo

source code


Foreach iteration of group A do group B

Instance Methods [hide private]
 
__init__(self, groupA, groupB, verbose=True, name="")
Foreach interation of group A do group B
source code
 
next(self)
Iterate all Generators to next value.
source code
 
reset(self)
Resets all Generators to there initial state.
source code
 
getForeachGroup(self)
Returns the For each group
source code
 
getDoGroup(self)
Returns the Do group
source code

Inherited from Group: __iter__, addGenerator, addGenerators, getAllGenerators, getName, removeGenerator, setName

Class Variables [hide private]

Inherited from Group (private): _generators, _identity, _name

Method Details [hide private]

__init__(self, groupA, groupB, verbose=True, name="")
(Constructor)

source code 

Foreach interation of group A do group B

Parameters:
  • groupA (Group) - The for each of group
  • groupB (Group) - The Do group
  • verbose (Boolean) - [optional] Control printing of group completed message, enabled by default.
Overrides: Group.__init__

next(self)

source code 

Iterate all Generators to next value.

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 Groups, please use the GroupCompleted exception instead of StopIteration (its a subclass).

Overrides: Group.next
(inherited documentation)

reset(self)

source code 

Resets all Generators to there initial state.

Overrides: Group.reset
(inherited documentation)