(I just stumbled again over this bug)
To solve this, I suggest to change one line in appy.pod.actions.Action.do() method (near the end):
if hasHiddenVariable: context[self.iter] = hiddenVariable else: #~ if self.exprResult: if context.has_key(self.iter): del context[self.iter]
See also http://code.activestate.com/recipes/413614-testing-for-an-empty-iterator/ for another facet of this problem: you cannot simply test "if x" to see if an iterator is empty. This works for lists and tuples, but not for generator functions.
Luc
(I just stumbled again over this bug)
To solve this, I suggest to change one line in appy.pod. actions. Action. do() method (near the end):
if hasHiddenVariable:
context[ self.iter] = hiddenVariable has_key( self.iter) :
else:
#~ if self.exprResult:
if context.
del context[self.iter]
See also http:// code.activestat e.com/recipes/ 413614- testing- for-an- empty-iterator/
for another facet of this problem: you cannot simply test "if x" to see if an iterator is empty.
This works for lists and tuples, but not for generator functions.
Luc