Another conditional expression candidate (PEP 308)

Terry Reedy tjreedy at udel.edu
Sun Feb 9 22:30:32 EST 2003


"Erik Max Francis" <max at alcyone.com> wrote in message
news:3E46EADE.6B7D8059 at alcyone.com...
> Evan wrote:
>
> > x = (if a > 0: 'positive' elif a == 0: 'zero' else: 'negative')
> >
> > The parentheses and 'else:' clause are mandatory.
>
> I suggested the same in these recent PEP threads as well.

I am pretty sure I prefer this to the PEP proposal, which seems
backwards to me.

TJR
]






More information about the Python-list mailing list