On Sat, 21 May 2016 09:57 am, Dennis Lee Bieber wrote: > On Fri, 20 May 2016 11:55:34 -0000 (UTC), Jon Ribbens > <jon+use...@unequivocal.co.uk> declaimed the following: > >> >>I would find that very confusing. "then:" makes it sound like >>executing that block is the usual case, when in practice it is >>usually the exception - the fallback code if the expected value >>was not found. > > And I'll second that... > > In those languages that use "then" as a keyword, it separates the "if" > conditional from the "true" block of code. Or -- visualize replacing the > ":" on the "for" with the word "then" > > for x in sequence then > do stuff with x > else > do something with no x > > > If a different keyword is to be introduced, I nominate "otherwise"
"otherwise" fails for the same reason that "else" fails: it suggests that the else block is an alternative to the for block, which is exactly what it is NOT. -- Steven -- https://mail.python.org/mailman/listinfo/python-list