Is there a function that applies list of functions to a value?
fp2161 at gmail.com
fp2161 at gmail.com
Fri Aug 30 02:14:09 EDT 2013
On Thursday, August 29, 2013 11:35:39 PM UTC+2, Chris Angelico wrote:
> On Fri, Aug 30, 2013 at 7:27 AM, <fp2161 at gmail.com> wrote:
>
> > Chris, call me a snob, but I resent using lambdas (aren't they usually considered odd/bad practice in python?)
>
>
>
> They're not bad practice; all they are is a function without a name,
>
> that's restricted to returning a single expression. So they're
>
> perfectly suited to this task, and ill-suited to some others.
>
>
>
> Like everything, lambda's a tool that can be used or misused.
>
>
>
> ChrisA
For this purpose however, I suspect that a named function with a proper docstring that can be imported and reused over and over again is probably more appropriate than a lambda (the first post is telling us about something happening from time to time...)
More information about the Python-list
mailing list