Proposed PEP for a Conditional Expression
Greg Ewing
greg at cosc.canterbury.ac.nz
Sun Sep 16 20:30:45 EDT 2001
Rainer Deyke wrote:
>
> The 'for'
> and 'if' clauses in a list comprehension do not act like expressions.
> Imagine then the confusion if the '<expr> if <cond> else <expr>', which
> *does* act like an expression, was added to the language.
Maybe some other word than 'if' should be used, then, such as
<expr> when <cond> else <expr>
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list