Is this a good use for lambda
Nick Coghlan
ncoghlan at iinet.net.au
Wed Dec 22 08:17:59 EST 2004
Jeff Shannon wrote:
> Er, not as far as I can tell.... the 2.4 feature was what wouldn't work
> consistently; the corrected version, using list() and reverse(), doesn't
> look like it has anything that'll be a problem in my 2.2 installation,
> and probably not in 2.1 ....
What he said :)
Although if you genuinely prefer a functional programming style, I'd go with
Terry's answer rather than mine.
(Incidentally, I didn't even know what the reduce trap *was* until Terry
described it, but the iterative version avoids it automatically)
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at email.com | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.skystorm.net
More information about the Python-list
mailing list