Draft Pep (was: Re: Let's Talk About Lambda Functions!)

Greg Ewing see_reply_address at something.invalid
Wed Aug 7 20:13:41 EDT 2002


Duncan Booth wrote:

> Not having spotted that particular flame war, may I ask whether this would 
> be interpreted as:
> 
>     	<expr> if <condition> else <expr>


Yes. One of the nice things is that it resembles what
mathematicians often write, e.g.

    x = 1,  if something
        2,  if something_else
        3,  otherwise

> The 
> second one is obviously wrong (condition before the if), but would probably 
> be expected by C programmers.


I'm not particularly worried about what they expect. :-)

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list