"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> or for the perhaps-overly-clever hackers,
> 
>     for x in iter(lambda: foo() or None, None):
>         process(x)

  for x in takewhile(bool, (foo() for _ in repeat(None))):
     process(x)

Meh, both are ugly.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to