For review: PEP 308 - If-then-else expression

holger krekel pyth at devel.trillke.net
Fri Feb 7 17:43:39 EST 2003


Jack Diederich wrote:
> On Fri, Feb 07, 2003 at 12:45:28PM -0800, Dave Brueck wrote:
> > On Fri, 7 Feb 2003, Jack Diederich wrote:
> > > On Fri, Feb 07, 2003 at 06:46:55PM +0100, holger krekel wrote:
> > > > What about a missing else clause? e.g.
> > > >
> > > >         <expression> if <condition>
> > >
> > > if (<condition>): <expression>
> > >
> > > is already legal so I'm -1 for yet another way to do it
> > 
> > Argh! :)
> > 
> > Please don't vote on this unless you've followed the discussion.  This is
> > not what the PEP is about.
> 
> It was a reply to your reply about the PEP, but I'll rephrase it.
> 
> I'm against extending the PEP to include <expr1> if <cond> instead of
> just <expr1> if <cond> else <expr2> as the PEP states.

But why?  Your above comparisons compares apples (expressions)
and oranges (statements). 

I'd appreciate it if we dicuss before voting.  But maybe that's
just me - beeing a silly "old" european.

    holger





More information about the Python-list mailing list