$10K coding deathmatch
amcnabb at mcnabbs.org
Fri Nov 3 16:30:26 MST 2006
I'm a big fan of Python, but this example made me want to cry.
Grounds for first bullet:
> value = reduce(lambda x,y: 0 < abs(x-y) <= len(nums) and y or
> None, [int(item) for item in nums])
Grounds for second bullet:
> print '%smatch' % (not value and 'Not a ' or '')
No speed improvement is sufficient to justify these abominable abuses of
syntax. That's assuming that you're trying to do this to speed up your
code, and I'm not sure that it would.
I love Python, but I acknowledge that it's not for everyone--at least
not for people who feel the need to write code like this.
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 186 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20061103/e754a071/attachment.bin
More information about the PLUG