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

2006-10-04 Thread Hans Polak
Hi Nick, Yep, PEP 315. Sorry about that. Now, about your suggestion do: setup code while condition loop body else: loop completion code This is pythonic, but not logical. The 'do' will execute at least once, so the else clause is not needed, nor

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

2006-10-04 Thread Hans Polak
code Cheers, Hans. -Original Message- From: Nick Coghlan [mailto:[EMAIL PROTECTED] Sent: lunes, 02 de octubre de 2006 12:48 To: Hans Polak Cc: python-dev@python.org Subject: Re: [Python-Dev] PEP 315 - do while Hans Polak wrote: Hi Nick, Yep, PEP 315. Sorry about that. Now

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

2006-10-04 Thread Hans Polak
@python.org Subject: Re: [Python-Dev] PEP 315 - do while Nick Coghlan wrote: Hans Polak wrote: Ok, I see your point. Really, I've read more about Python than worked with it, so I'm out of my league here. Can I combine your suggestion with mine and come up with the following: do

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

2006-10-04 Thread Hans Polak
Coghlan [mailto:[EMAIL PROTECTED] Sent: martes, 03 de octubre de 2006 15:51 To: Fuzzyman Cc: Hans Polak; python-dev@python.org Subject: Re: [Python-Dev] PEP 315 - do while Fuzzyman wrote: Nick Coghlan wrote: In my example, the 3 sections (setup code, loop body and loop completion code are all

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

2006-10-04 Thread Hans Polak
: Hans Polak; python-dev@python.org Subject: Re: [Python-Dev] PEP 315 - do while Nick Coghlan wrote: [snip..] The current idiom works fine, but looks unnatural : while True: if condition: break There's the rationale for the PEP in a whole 5 lines counting whitespace

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

2006-10-04 Thread Guido van Rossum
You are all wasting your time on this. It won't go in. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

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

2006-10-04 Thread Jeremy Hylton
On 10/4/06, Guido van Rossum [EMAIL PROTECTED] wrote: You are all wasting your time on this. It won't go in. +1 from me. Should you mark PEP 315 as rejected? Jeremy -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev

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

2006-10-04 Thread Raymond Hettinger
I'll mark it as withdrawn. Raymond -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Hylton Sent: Wednesday, October 04, 2006 8:44 AM To: Guido van Rossum Cc: Hans Polak; python-dev@python.org Subject: Re: [Python-Dev] PEP 315 - do while On 10/4/06

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

2006-10-03 Thread Nick Coghlan
Hans Polak wrote: Ok, I see your point. Really, I've read more about Python than worked with it, so I'm out of my league here. Can I combine your suggestion with mine and come up with the following: do: setup code loop body while condition

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

2006-10-03 Thread Fuzzyman
Nick Coghlan wrote: Hans Polak wrote: Ok, I see your point. Really, I've read more about Python than worked with it, so I'm out of my league here. Can I combine your suggestion with mine and come up with the following: do: setup code loop body while

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

2006-10-03 Thread Nick Coghlan
Fuzzyman wrote: Nick Coghlan wrote: In my example, the 3 sections (setup code, loop body and loop completion code are all optional. A basic do-while loop would look like this: do: setup code while condition (That is, setup code is still repeated each time

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

2006-10-03 Thread Fuzzyman
Nick Coghlan wrote: [snip..] The current idiom works fine, but looks unnatural : while True: if condition: break There's the rationale for the PEP in a whole 5 lines counting whitespace ;) Would a 'while' outside of a 'do' block (but without the colon) then be a syntax

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

2006-10-03 Thread Ron Adam
Nick Coghlan wrote: Fuzzyman wrote: Nick Coghlan wrote: In my example, the 3 sections (setup code, loop body and loop completion code are all optional. A basic do-while loop would look like this: do: setup code while condition (That is, setup code is still

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

2006-10-02 Thread Nick Coghlan
Hans Polak wrote: Hi Nick, Yep, PEP 315. Sorry about that. Now, about your suggestion do: setup code while condition loop body else: loop completion code This is pythonic, but not logical. The 'do' will execute at least once, so the