Does the partial just do a lambda in the background? It's a neat example, thanks! I've never seen this used before. Sorry if reply is top-posted or otherwise weird, posting from mobile.
On 11/20/09, Lie Ryan <lie.1...@gmail.com> wrote: > lau...@protopc.com wrote: >> John, >> >> Thank you so much for your help! -- Problem SOLVED!!! -- Your explanation >> and example was extremely helpful. I am very grateful. >> >> Lauren :-) > > if you want to pass an argument, you can "curry" the function with > functools.partial() > > # currying the function, don't execute yet.. > d = {'abc': functools.partial(func, arg1, arg2, arg3), > } > > # execute the curried function now > d['abc']() > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- Sent from my mobile device _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor