Attitude about new keywords
mis6 at pitt.edu
Tue Feb 11 01:10:53 CET 2003
Peter Hansen <peter at engcorp.com> wrote in message news:<3E47E9D1.8B0A0986 at engcorp.com>...
> Just because the test in the list comprehension comes later is
> no reason to insist that it must come later in other cases.
> Foolish consistency is ... oh, never mind. Someone else already
> said that. :-)
I am not saying it *should* come later, I am saying there is a precedent.
I can become accustomed to the reverse order in few minutes, doesn't
seems to me to be such a disaster. YMMV, of course.
Anyway, my initial preference was for "when C then x else y" but this
requires two new keywords and seems an improbable candidate, now.
There is a price to pay for the ternary, and I think many will not
want to pay that price.
More information about the Python-list