[Python-Dev] Adding C ternary select (a?b:c) to Python?
Moshe Zadka
Moshe Zadka <mzadka@geocities.com>
Tue, 1 Feb 2000 04:20:41 +0200 (IST)
On Mon, 31 Jan 2000 gvwilson@nevex.com wrote:
> > It (?:) would allow you to incorporate logic into expressions.
> > There are contexts where only expressions are allowed, such as:
> > - lambdas
> > - DTML expr attributes
> > in which I'd very much like to incorporate tests.
>
> Don't know much about DTML, but believe that being able to put
> conditionals in lambdas would make the latter much more useful.
Giving Guido one less reason to dislike ?: <wink>
Seriously, I disagree with the basic premise of you and Jim: you can
*already* have control structures inside experessions with and/or, so even
for Jim's twisted meanings for "add new functionality to the language"
it's not true.
> Is anything easier with ?: --- yes.
For the reader, for the writer or for the cp4e-newbie learning Python?
cluttering-another-mailing-list-ly y'rs, Z.
--
Moshe Zadka <mzadka@geocities.com>.
INTERNET: Learn what you know.
Share what you don't.