Looping [was Re: Python and the need for speed]

Marko Rauhamaa marko at pacujo.net
Tue Apr 18 00:41:26 EDT 2017

Ben Bacarisse <ben.usenet at bsb.me.uk>:

> Python opts for
>   while True:
>      c = sys.stdin.read(1)
>      if c != ' ': break

I opt for that in C and bash as well.

In fact, when I start writing a loop, I first type:

    while True:

Once it is done, I might notice that the loop begins:

    while True:
        if ...

and merge "while" and "if".


More information about the Python-list mailing list