[TUHS] 80 columns ...

Ian Zimmerman itz at very.loosely.org
Sun Nov 12 04:05:48 AEST 2017


On 2017-11-11 12:30, Random832 wrote:

> for val in iter(function, STOP):
>     do_something()

A neat trick, thanks.

> (If the function is readline, though, you can just iterate over the
> file object)

This doesn't work if the file object can be a tty (such as stdin), IIRC
due to stdio buffering effects.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet, fetch the TXT record for the domain.



More information about the TUHS mailing list