Dr. Dobb's Python-URL! - weekly Python news and links (Dec 7)

David Isaac aisaac0 at verizon.net
Thu Dec 8 22:25:29 EST 2005


"Cameron Laird" <python-url at phaseit.net> wrote in message
news:dn7ibf$id0$1 at lairds.us...
>     Jibes against the lambda-clingers lead eventually to serious
>     questions of style in regard to variable namespacing,
>     lifespan, cleanup, and so on:
>
http://groups.google.com/group/comp.lang.python/browse_thread/thread/ad0e15cb6b8f2c32/


#evaluate polynomial (coefs) at x using Horner's ruledef horner(coefs,x):
return reduce(lambda a1,a2: a1*x+a2,coefs)'Nuf said.Alan Isaac





More information about the Python-list mailing list