$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'
else:
print 'not a match'
Now that I read over that, nevermind. I guess it's just too readable.
--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
More information about the PLUG
mailing list