Python paradigms

Darrell darrell at dorb.com
Sun Apr 9 15:17:19 EDT 2000


> x = (a != NULL ? a[i]->weeble : 0) + (b != NULL ? b[i]->wombat : 0)

x=0
if a != NULL:
    x=a[i].weeble

if b != NULL:
    x=x+b[i].wombat

Isn't this more clear?
In fact isn't not much if any longer than the "C" version when you count the
parens used.

--Darrell








More information about the Python-list mailing list