$10K coding deathmatch

Andrew McNabb amcnabb at mcnabbs.org
Mon Nov 6 13:53:49 MST 2006

On Fri, Nov 03, 2006 at 06:14:43PM -0700, Levi Pearson wrote:
> >On the second bullet, why not something like:
> >
> > print(value and 'match' or 'not a match')
> That's probably clearer and faster, but the original didn't strike me  
> as shooting offense. :)

Let me be radical and propose:

if value:
    print 'match'
    print 'not a match'

Now that I read over that, nevermind.  I guess it's just too readable.

Andrew McNabb
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

More information about the PLUG mailing list