PEP-308 a "simplicity-first" alternative

Tim Peters tim_one at
Wed Feb 12 04:19:16 CET 2003

[Tim, on Holger's minimal-impact "x and y else z"]
> Redefining truth used to be easier <wink>:  I mentioned it to Guido late
> afternoon, and his reaction was that it must have been cooked up by
> someone who spent too much time in this thread.

[holger krekel]
> Indeed.  Does this reaction indicate anything in particular?

That he doesn't like it, of course, and that it requires thinking too much
about it before you can feel comfortable with it.  Thought experiment:
suppose you were designing a new language.  Would you consider adopting
Python's "x and y else z" notation for the new language's conditionals?  If
not, then maybe it's a case of settling for too little.

> Maybe he could help us by outruling some possibilities so we don't spend
> another 1000 hours (combined) discussing mute issues.  We played around
> to quite some exhaustion already <wink>.  From his original PEP I e.g
> read that he is not ready to introduce a new keyword for a "minor
> feature".
> That's still the case i guess.

It's my part-time job to channel Guido, because he's always overloaded.  For
some reason it doesn't count that I am too <wink>.  It occurred to me today
that the patch Guido wrote two years ago ("if c then a else b"), and the
suggestion he started with in the PEP last week ("a if c else b"), and the
newer suggestion he's shown some liking for ("if c: a else: b") have one
thing in common:  they all contain the word "if".  As a Professional
Channeler, my bet is that any spelling that *doesn't* contain "if" is going
to get rejected in the end for being too obscure.  OTOH, "if" says "if" as
plainly as anything can say "if".

Remember that Guido doesn't want this enough to accept much ugliness in
order to get it.  Indeed, he'd be happy to leave the language alone here.

More information about the Python-list mailing list