while (a=b()) ...

Aahz Maruch aahz at netcom.com
Sat May 15 14:02:35 EDT 1999


In article <373DAF53.4287D726 at home.com>, Jim Meier  <fatjim at home.com> wrote:
>> Aahz Maruch <aahz at netcom.com> wrote:
>>>
>>> What does this give you that
>>>
>>>   for line in f.readline()
>>>     frobulate(line)
>>>
>>> does not?  (Assuming the necessary semantic changes to permit this to
>>> work *well*.)
>
>As was told to me previously, this *is* excellent, readable and usable..
>But while it does solve the big, big "while 1"-is-not-an-infinite-loop
>ugliness, the use of break is still involved instead of other, harder-edged
>controls. I have no problem with this, I just felt like nit-picking to
>recover my manliness. <whoops-blew-my-cover-style grin>

How is break involved?
-- 
                      --- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6       <*>      http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

'It's odd, and a little unsettling, to reflect upon the fact that English is 
the only major language in which "I" is capitalized; in many other languages 
"You" is capitalized and the "i" is lower case.'  -- Sydney J. Harris




More information about the Python-list mailing list