[Python-ideas] "While" suggestion
cvrebert at gmail.com
Thu Jul 3 22:30:42 CEST 2008
On Thu, Jul 3, 2008 at 1:22 PM, Stavros Korokithakis
<stavros at korokithakis.net> wrote:
> I don't know where this "while True" concept snuck in, the proposal isn't
> supposed to replace those, it's supposed to replace this:
> while <expression>"
And "while True" is the currently accepted idiom to replace that,
which possibly makes "while as" unnecessary.
if not <expression>: break
Note that <setup> is no longer repeated.
> Steven Bethard wrote:
>> On Thu, Jul 3, 2008 at 11:11 AM, Torsten Bronger
>> <bronger at physik.rwth-aachen.de> wrote:
>>>> 2008/7/3 Stavros Korokithakis
>>>> <stavros at korokithakis.net>:
>>>>> while my_file.read(1024) as data:
>>> I don't like it. Taken as an English expression, it suggests
>>> something misleading. I looked at my own code (not much; 15.000
>>> lines) and found three "while True", and none of them could be
>>> expressed with "while ... as ...". It is not worth it in my
>> I had similar results. Around 10 "while True" constructs, and none of
>> them would have worked with "while ... as ..."
>> -1 for me.
> Python-ideas mailing list
> Python-ideas at python.org
More information about the Python-ideas