Proposed PEP for a Conditional Expression

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Sep 13 19:03:17 EDT 2001


Rainer Deyke wrote:
> 
> I was actually considering the following interpretations:
> 
> [(<expr> for i in range(5)) if <cond> else <expr>]

That one isn't even an interpretation, it's nonsense.
Unless you mean it to mean

  [<expr> for i in range(5)] if <cond> else [<expr>]

and I wouldn't mind in the least being required to
write it like that if that's what I wanted.

-- 
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