proposals for having more fun with map
twic at urchin.earth.li
Sat Oct 9 20:50:44 CEST 2004
On 9 Oct 2004, Ville Vainio wrote:
> >>>>> "Tom" == Tom Anderson <twic at urchin.earth.li> writes:
> Tom> wanting to do all the time, so i either end up throwing lambdas all over
> Tom> the place to glue the dicts into map, or writing a little helper function
> Tom> like so:
> Tom> def functor(dict):
> Tom> return lambda arg: dict[arg]
> See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305318
of course! i really should use the operator package more; it just feels
kind of clunky to me.
> Tom> again, trivial, but if i'm writing this out in almost every
> Tom> program i write, other people must be too, so it's worth
> Tom> putting in the core.
> Actually, the more likely future of map is moving *out* of the core, to
> a "functional" module of some sort. List comprehensions (and soon
> genexps) are the recommended approach.
NOOOOOOO!!!!!!!!!!!!!!!!!! one by one, my favourite languages are being
mutilated beyond recognition ... </overreaction>
I came here to chew gum and kick ass
More information about the Python-list