[Tutor] Passing perimeters in dictionary values?
Lie Ryan
lie.1296 at gmail.com
Wed Feb 25 05:11:29 CET 2009
On Tue, 24 Feb 2009 18:26:29 -0500, Kent Johnson wrote:
> On Tue, Feb 24, 2009 at 5:13 PM, nathan virgil <sdragon1984 at gmail.com>
> wrote:
>> I'm not familiar with lambdas yet, and I don't think this book will
>> introduce me to them; they aren't listed in the index, anyway.
Nobody remembers partial?
from functools import partial
newfunc = partial(myfunc, 1, 2, 3)
newfunc()
{'eatgrass': partial(eat, 'grass'), 'eatcarrot': partial(eat, 'carrot')}
More information about the Tutor
mailing list