"Fredrik Lundh" <fredrik at pythonware.com> writes: > or for the perhaps-overly-clever hackers, > > for x in iter(lambda: foo() or None, None): > process(x) for x in takewhile(foo() for _ in repeat(None)): process (x)