PEP-0315--Enhanced While Loop: An idea for an alternative syntax
дамјан г.
mk at net.mail.penguinista
Wed Feb 18 12:25:06 EST 2004
> while:
> x = foo()
> and while x != 0:
> bar(x)
>
> This example actually incorporates two changes:
>
> 1) "while:" is equivalent to "while True:"
>
> 2) "and while <condition>:" is an exit from the middle of the loop,
> analogously to PEP 315.
How about "until" instead of "and while not", shorter and not new in the
programing languages.
while:
x = foo()
until x == 0:
bar(x)
--
Дамјан (jabberID:damjan at bagra.net.mk)
hundred-and-one symptoms of being an internet addict:
21. Your dog has its own home page.
More information about the Python-list
mailing list