[Python-Dev] PEP 351 - do while (original) (raw)
Phillip J. Eby pje at telecommunity.com
Sun Oct 1 19:55:06 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 ]
At 12:58 PM 10/1/2006 -0400, Andrew Koenig wrote:
> (I don't think this has been suggested yet.) > > while , : >
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: be any different from while (x, y): ? My other concern is that is evaluated out of sequence.
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: break" that's more visible due to not being indented.
I'm not sure I like it, myself, but out of all the things that get suggested for this issue, I think it's the best. The fact that it's still not very good despite being the best, is probably the reason we don't have it yet. :)
- Previous message: [Python-Dev] PEP 351 - do while
- Next message: [Python-Dev] PEP 351 - do while
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]