Yet Another PEP308 syntax
David Eppstein
eppstein at ics.uci.edu
Mon Feb 10 11:12:53 EST 2003
In article <mailman.1044892786.2769.python-list at python.org>,
Gerrit Holl <gerrit at nl.linux.org> wrote:
> although I am against a ternary operator, here is Yet Another PEP308
> syntax:
>
> a = ?(test, true_case, false_case)
> or
> a = test?(true_case, false_case)
Why do people keep proposing cryptic punctuation-based syntax for this?
Using punctuation instead of words makes the meaning non-obvious,
especially to new programmers who have not used C/C++/Java, and so it
seems unlikely that the BDFL will ever accept it. Such proposals
clutter the discussion without making progress towards getting a ternary
included in the language.
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list