PEP 308 vote type (was Re: Update to PEP308: if-then-else expression)

Delaney, Timothy C (Timothy) tdelaney at avaya.com
Tue Feb 11 20:10:04 EST 2003


> From: Bengt Richter [mailto:bokr at oz.net]
> 
> I think I'd prefer an explicit [-1][-0][+0][+1] radio button set for
> each alternative to be voted upon.

Make that [-1][-0][0][+0][+1] to cater for those who have *no* preference at all on a particular item.

Of course, I won't be such a person. So far, I'm:

+0 on having a ternary at all (was -0, but found an option I liked);

-0 on having a short-circuiting ternary - I've yet to find something that *relies* on short-circuiting in a ternary which didn't require me to think hard about what was going on - control flow should be explicit;

-2 on all syntax proposals which are not of the form <test> <true result> <false result>;

+1 on bool.if(self, trueresult, falseresult)

where `if` obviously needs to be replaced with something else e.g.

    (x == y).ifelse(True, False)

which of course will not be an option in the voting because it doesn't short-circuit;

-1 on all other current syntax proposals.

Tim Delaney





More information about the Python-list mailing list