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

Thomas Wouters thomas at xs4all.net
Tue Mar 11 04:02:41 EST 2003


On Mon, Mar 10, 2003 at 05:30:37PM -0800, Erik Max Francis wrote:

> Any language feature can be abused.  The writer of the abuse is to blame
> for such misuses, not the language.

Then why is Python any better than C, C++, Java, Perl, *LISP, etc ? Why are
we using indentation for blocks, if we can trust the writer not to mis-use
indentation ? Many people will answer to the first by explaining Python is
small, simple, easy to learn. Some may say (as they have in the past) 'it
fits your brain'. Where does adding features from other languages stop ?

I've seen my share of 'bad' Python, which was split into two camps:
incorrect use of whitespace, and not enough object-oriented code. Cases of
the first were suprisingly easy to fix using a few search-and-replaces, and
cases of the second were suprisingly easy to fix with some minor
refactoring.

-- 
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