A suggestion for a do...while loop

June 26, 2017
1:20 p.m.
All these situations could be handled by making a "while:" with no condition act as "while True:"
There was a big related discussion on Python-list in April (subject "Looping" ). IMHO the cleanest way to denote an infinite loop would be the statement "loop:" Without introducing new keyword I think the optimal would be just "while:" I dont't like "while True:" simply because it does not make enough visual distinction with the "while condition:" statement. E.g. I can have while True: ... while Blue: .... Which adds some extra brain load. So if there was explicit "while:" or "loop:" I would update for it globally in my projects. Mikhail
2823
Age (days ago)
2823
Last active (days ago)
2 comments
3 participants
participants (3)
-
Cameron Simpson
-
Ethan Furman
-
Mikhail V