On Thu, May 10, 2018 at 11:45 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> To be honest, I'm having trouble thinking of a good use-case for "while
> True", now that we have infinite iterators. Most cases of
>
>     while True:
>         x = get_item()
>         if not x: break
>         process(x)
>
> are better written as:
>
>     for x in iterator:
>         process(x)

x = get_item()
while True:
    x = process(x)
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to