[Python-Dev] while:

Martin Blais martin.blais at gmail.com
Wed Jul 20 05:13:02 CEST 2005


Hi

Today I typed something funny in the interactive interpreter:


>>> while:
  File "<stdin>", line 1
    while:
         ^
SyntaxError: invalid syntax


it got me wondering, wouldn't it be nice if

   while:
      ...

behaved as:

   while True:
      ...

Since they appeared, I started using "while True:" instead of "while
1:" for this common idiom.  I find it reveals the intention better,
but I don't like the typing.

Opinions?

cheers,


More information about the Python-Dev mailing list