"John J. Lee" <jjl at pobox.com> wrote in message news:87smmyndi1.fsf at pobox.com... > def f(): return raw_input() > > for x in iter(f, ""): > print x Nice -- I keep forgetting about iter() -- except that the wrapper adds nothing that I can see. >>> for l in iter(raw_input, ''): print '*', l, '*' ... aksjf * aksjf * jslfkj * jslfkj * >>> Terry J. Reedy