The ternary operator: more than one way to do it?

Thomas Wouters thomas at xs4all.net
Tue Mar 11 05:45:04 EST 2003


On Tue, Mar 11, 2003 at 02:14:16AM -0800, Erik Max Francis wrote:
> Thomas Wouters wrote:

> > Then why is Python any better than C, C++, Java, Perl, *LISP, etc ?

> I didn't make that claim, so I don't feel much need to comment on it.

If Python is *not* better than the other languages (in whatever domain, for
whatever reason, in whoever's opinion (certainly mine!)) why are we using
it ?

> I will say that the given example of a pathologically bad use of complex
> expressions was one you yourself wrote, and in a prioprietary language not
> listed here.

It's not listed because MOO isn't better than Python. It's also not
proprietary:

http://sourceforge.net/projects/lambdamoo/

> As part of an argument involving why conditional operators would be a
> bad idea to add to Python, it is not exactly a convincing example of
> misuse, since it's wholly irrelevant.

In which case you didn't understand the purpose of the example at all, since
it follows Python semantics almost directly, the only difference is the use
of splicing instead of list concatenation, and that is a nearly direct
translation.

And the point wasn't that the single feature of ?: (or whatever the syntax
would be) would result in this, but 'when do you stop adding features' or
'when does the weight of new features outweigh the weight of a new feature'.
You're free to ignore the rest of my off-topic, other-worldly babblign as
long as you realize that that last question is important. At least to some
of us.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!





More information about the Python-list mailing list