David Mertz, Ph.D. writes: > I think the Python version does the right thing by emphasizing the > DEFAULT by putting it first, and leaving the predicate and fallback > until later in the expression (right for Pythonic code, not right > for other languages necessarily).
Aside: I think that's true for Pythonic scripting, but in general I think you're just as likely to find that it's a genuine choice, and that the condition is as interesting as either choice. Variation on the theme of conditional expression: I'd often like to write var = computed() if cond() else break or var = computed() if cond() else continue I wonder if that syntax has legs, or if it's too cute to stand. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/WUSUIRQ5XLFSS5JQKI3DYZ7SIDABERKY/ Code of Conduct: http://python.org/psf/codeofconduct/