>> do: >> <body> >> until <cond> > That looks nice to me.
Except this puts loop entry statement (do) and loop condition test (until) on different levels of indentation, which is I don't quite like. Compared to the existing loop statements, ------------------- while Cond: body else: exit ------------------- for Iter: body else: exit ------------------- This would seem more logical: ------------------- do: body while Cond: else: exit ------------------- do: body until Cond: else: exit ------------------- Although the trailing colon is still a bit unpleasant: ------------------- do: body while Cond: # no else here ------------------- Sincerely, Dmitry Dvoinikov http://www.targeted.org/ --- Original message follows --- > [BJörn Lindqvist] >> I would like to have do-while's like this: >> >> do: >> <body> >> until <cond> >> >> But I'm sure that has problems too. > That looks nice to me. > Raymond > _______________________________________________ > Python-Dev mailing list > Python-Dev@python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/dmitry%40targeted.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com