Conditional operator in Python?

Michael Chermside mcherm at destiny.com
Fri Sep 7 18:10:04 EDT 2001


Well, I'm probably not the best choice, to do it, but nothing will
happen if no one tries. So here's my deal: if someone else wants to
write this PEP, then *PLEASE EMAIL ME* (mcherm at destiny.com) and I'll
help your effort instead. If no one else speaks up by emailing me or
posting to this thread, then I will take a stab at writing a PEP over
the weekend and next week.

If I *do* write a PEP, then creating a conditional operator syntax for
Python will NOT be its goal. Rather, the goal will be to put this
Frequently Proposed Enhancement to rest, by creating a PEP which
summarizes ALL of the arguments, both pro and con, in a single place
and hopefully with some coherence. If collecting these arguments should
lead the powers-that-be (community consensus (yeah, right!) or BDFL) to
believe that a particular solution is "best", and ALSO that it's better
to have than not to have, than that'd be great. But my goal would be to
make the decision possible, not necessarily to introduce the feature.

So... write me if you'd like to tackle this one, otherwise I'll try.

-- Michael Chermside



Erik Francis wrote:

 > Marcin 'Qrczak' Kowalczyk wrote:
 >
 >> What about:
 >> > if X: Y else: Z
 >> > There is no conceptual conflict with the statement if, because when
 >> a statement can be understood in both ways, they have the same effect
 >> anyway. I'm only not sure if it's easy to parse using current Python
 >> parser.
 >
 > That looks good to me.  Now who's up for a PEP?
 >
 > --
 >  Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 > __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
 > /  \ Success and failure are equally disastrous.
 > \__/ Tennessee Williams
 >     Interstelen / http://www.interstelen.com/
 > A multiplayer, strategic, turn-based Web game on an interstellar scale.
 >
 >
 >
 >







More information about the Python-list mailing list