[Tutor] Passing perimeters in dictionary values?

Richard Lovely roadierich at googlemail.com
Fri Feb 27 14:54:50 CET 2009


On 25/02/2009, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> "nathan virgil" <sdragon1984 at gmail.com> wrote
>
> > Whenever I try to use the talk method (which reports the mood, and doesn't
> > take parameters), it says I gave it too many parameters.
> >
>
> Sorry, I should have pointed out that you will need to redefine
> all your functions to accept a parameter.
>
> Alan G
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>

Always makes me smile when (experienced) people redesign the wheel...

>From the docs (http://www.python.org/doc/2.6/library/functools.html):

"The partial() is used for partial function application which
“freezes” some portion of a function’s arguments and/or keywords
resulting in a new object with a simplified signature."

-- 
Richard "Roadie Rich" Lovely, part of the JNP|UK Famile
www.theJNP.com


More information about the Tutor mailing list