Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Ron Adam
Nick Coghlan wrote: Hans Polak wrote: Hi, Just an opinion, but many uses of the ‘while true loop’ are instances of a ‘do loop’. I appreciate the language layout question, so I’ll give you an alternative: do: body setup code while

Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Michael Urman
On 10/1/06, Ron Adam [EMAIL PROTECTED] wrote: (I don't think this has been suggested yet.) while enter_condition, exit_condition: body [snip] Putting both the entry and exit conditions at the top is easier to read. I agree in principle, but I thought the proposed syntax

Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Andrew Koenig
(I don't think this has been suggested yet.) while enter_condition, exit_condition: body This usage makes me uneasy, not the least because I don't understand why the comma isn't creating a tuple. That is, why whould while x, y: body be any different

Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Phillip J. Eby
At 12:58 PM 10/1/2006 -0400, Andrew Koenig wrote: (I don't think this has been suggested yet.) while enter_condition, exit_condition: body This usage makes me uneasy, not the least because I don't understand why the comma isn't creating a tuple. That is, why whould

Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Andrew Koenig
This pattern: while entry_cond: ... and while not exit_cond: ... has been suggested before, and I believe that at least one of the times it was suggested, it had some support from Guido. Essentially, the and while not exit is equivalent to an if exit:

Re: [Python-Dev] PEP 351 - do while

2006-10-01 Thread Ron Adam
Michael Urman wrote: On 10/1/06, Ron Adam [EMAIL PROTECTED] wrote: (I don't think this has been suggested yet.) while enter_condition, exit_condition: body [snip] Putting both the entry and exit conditions at the top is easier to read. I agree in principle, but I thought

[Python-Dev] PEP 351 - do while

2006-09-30 Thread Hans Polak
Hi, Just an opinion, but many uses of the while true loop are instances of a do loop. I appreciate the language layout question, so Ill give you an alternative: do: body setup code while condition Cheers, Hans Polak. This message contains information that may be

Re: [Python-Dev] PEP 351 - do while

2006-09-30 Thread Nick Coghlan
Hans Polak wrote: Hi, Just an opinion, but many uses of the ‘while true loop’ are instances of a ‘do loop’. I appreciate the language layout question, so I’ll give you an alternative: do: body setup code while condition I believe