[Python-Dev] PEP 351 - do while (original) (raw)
Michael Urman murman at gmail.com
Sun Oct 1 16:14:14 CEST 2006
- Previous message: [Python-Dev] PEP 351 - do while
- Next message: [Python-Dev] PEP 351 - do while
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/1/06, Ron Adam <rrr at ronadam.com> wrote:
(I don't think this has been suggested yet.)
while , :
[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 already has meaning today (as it turns out, parentheses are required to make a tuple in a while condition, at least in 2.4 and 2.5). To help stave off similar confusion I'd rather see a pseudo-keyword added. However my first candidate "until" seems to apply a negation to the exit condition.
while True until False: # run once? run forever?
while True until True: # run forever? run once?
It's still very different from any syntactical syntax I can think of in python. I'm not sure I like the idea.
Michael
Michael Urman http://www.tortall.net/mu/blog
- Previous message: [Python-Dev] PEP 351 - do while
- Next message: [Python-Dev] PEP 351 - do while
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]