[Python-Dev] Adding a conditional expression in Py3.0 (original) (raw)

Brett Cannon bcannon at gmail.com
Tue Sep 20 22:39:56 CEST 2005


On 9/20/05, Phillip J. Eby <pje at telecommunity.com> wrote:

At 12:17 PM 9/20/2005 -0700, Guido van Rossum wrote: >I think I'd prefer (if then else ) i.e. no >colons. None of the other expression forms (list comprehensions and >generator expressions) involving statement keywords use colons.

+1, despite the fact that we seem on a slippery slope towards becoming a kind of infix Lisp. ;) Between (yield x), (x for x in y), and now (if x then y else z), it seems that parentheses are all the rage now. Will we get (try finally ) next? <0.5 wink>

+1 from me as well. The use will be much more obvious to a newbie than <expr> ? <expr> : <expr>. And I have used the syntactic-heavy listcomps in Haskell and I must say that Python's version is much nicer. I like the wordy version. =)

> > If you want general community input, I would suggest a runoff ballot with > > those four choices (and a summary of pros and cons of each), or fewer if > > you see any as unacceptible. > >If there's one thing I've learned from the PEP 308 vote, it is that >votes for language don't work. I prefer some discussion on Python-dev >after which I pick one. Also +1. :)

+1 from me, although I sure got lambasted by some people when I said I liked this style during the whole decorator debate. =)

-Brett



More information about the Python-Dev mailing list