Hans Nowak <[EMAIL PROTECTED]> wrote:
   ...
> Maybe I misunderstand, but shouldn't this be:
> 
> def WHILE(cond):
>      if not cond(): return
>      yield None
>      for x in WHILE(cond): yield x
> 
> After all, the original version only yields two things: None and a 
> generator.
> 
> (Or is this behavior different in Python 2.5?  I hope not...)

No misunderstanding on your part, just my error on untested code -- no
changes in Python 2.5 so that yield of a generator means yielding each
of its items, my bad, sorry.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to