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
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
@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
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
: 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
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:
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
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
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
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
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
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
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
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
14 matches
Mail list logo