do/while structure needed
Edward Elliott
nobody at 127.0.0.1
Tue May 16 21:57:34 EDT 2006
Dennis Lee Bieber wrote:
> Would you put the condition at the top of the loop -- and confuse
> those people who believe the exit condition should appear at the point
> the exit activates?
Confusion is not the issue. You can put the condition smack dab in the
middle of the loop, as long as the location is consistent people will know
where to look for it. Rejecting because "some are confused the first time
since other languages do it differently" gets you nowhere: some group will
always be confused by something. They learn, problem solved.
I agree that do/while is unnecessary. But I'd argue against it on grounds
of simplicity and readability instead of confusion.
--
Edward Elliott
UC Berkeley School of Law (Boalt Hall)
complangpython at eddeye dot net
More information about the Python-list
mailing list