Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: while expression feature proposal Date: Thu, 25 Oct 2012 14:15:05 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 18 Message-ID: References: <50886398.5050301@tim.thechases.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1351174505 9778 64.122.56.22 (25 Oct 2012 14:15:05 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 25 Oct 2012 14:15:05 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.python:32127 On 2012-10-24, Cameron Simpson wrote: >| I must say I really like the parity of Dan's >| while EXPR as VAR: >| BLOCK >| proposal with the "with" statement. > > Well, it's nice. But usually EXPR will be a boolean. I guess that depends on what sort of programs you write. In my experience, EXPR is usually a read from a file/socket/pipe that returns '' on EOF. If VAR is not '', then you process, then you process it inside the loop. -- Grant Edwards grant.b.edwards Yow! We're going to a at new disco! gmail.com