On Friday, June 3, 2016 at 9:33:32 PM UTC+12, BartC wrote: > On 03/06/2016 03:47, Lawrence D’Oliveiro wrote: >> On Friday, June 3, 2016 at 8:52:52 AM UTC+12, BartC wrote: >>> Simple iterative for-loops are more of a DIY effort... >> >> There is one case that Python handles more nicely than C. > > Just one case? Python is miles away from a C 'for'.
Yes, just one case. In Python you write a loop with one exit in one way, a loop with two exits in a different way, and a loop with more than two exits in yet another entirely different way. Can you say “cognitive burden”? The for-statement in C handles most of my looping requirements. I rarely use while-loops, and do-whiles almost not at all--not for looping, anyway <https://github.com/ldo/dvd_menu_animator/blob/master/spuhelper.c>. -- https://mail.python.org/mailman/listinfo/python-list