> Let me be radical and propose:
> 
> if value:
>     print 'match'
> else:
>     print 'not a match'

print ($value) ? 'match' : 'not a match';

Yay for tertiary operators.  Of course, Python may or may not have
those, I wouldn't know.  I'm a Perl bigot.

Greg

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to