Code basics

Joshua Macy amused at webamused.com
Fri Mar 17 22:26:04 CET 2000


Lance Ellinghaus wrote:
> 
> For some of us (C programmers by trade), this type of coding is very normal and
> has no readability problems.
> 
> In C you could do the following:
> 
> printf( (getNumberOfSomething()==10 ? "Tjohoo" : "Oh no!") );
> 
> When I first saw this code posted, I thought "Nice! Clean and simple"...
> 
> Lance Ellinghaus
> 
> 

  Code that's normal and readable for C belongs in C, not in Python. 
It's very common to see programmers writing C or FORTRAN programs in
whatever language they're currently using, but those programs are never
as good (readable, correct, maintainable) as programs actually written
in the native idiom.

 
If-all-you-have-is-a-hammer-every-problem-begins-looking-like-it-requires-a-ternary-operator-ly
y'rs,  Joshua



More information about the Python-list mailing list