Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-07-02 Thread Ben Finney
dieter writes: > Ben Finney writes: > > ... Rather, the motivation was that a complex thing, with many > > moving parts, has an unexplained implementation: a nested set of > > functions without names to explain their part in the pattern. > > In a

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-07-02 Thread dieter
Ben Finney writes: > ... > Rather, the motivation was that a complex thing, with many moving parts, > has an unexplained implementation: a nested set of functions without > names to explain their part in the pattern. In a previous reply, I have tried to explain

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-07-01 Thread Ben Finney
Ben Bacarisse writes: > By replying I'm not accepting the premise -- I have no idea if there > is widespread fear and suspicion of lambdas among Python users but it > seems unlikely. I can testify, as the person who started this thread, that there is no fear or suspicion

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-07-01 Thread Ben Bacarisse
dieter writes: >> Lawrence D’Oliveiro wrote: >>> I don’t know why this fear and suspicion of lambdas is so widespread among >>> Python users ... former Java/C# programmers, perhaps? By replying I'm not accepting the premise -- I have no idea if there is widespread fear and

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-07-01 Thread dieter
Peter Otten <__pete...@web.de> writes: > Lawrence D’Oliveiro wrote: > >> On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: >> >>> I would like to see a more Pythonic, more explicit and expressive >>> replacement with its component parts easily understood. >> >> I don’t know why

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: >> foo = lambda : >> >> there is syntactic sugar in Python that allows you to write it as >> >> def foo(): >> return >> >> with the nice side effects that it improves the readability of

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Steven D'Aprano
On Thursday 30 June 2016 17:43, Lawrence D’Oliveiro wrote: > On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: >> foo = lambda : >> >> there is syntactic sugar in Python that allows you to write it as >> >> def foo(): >> return >> >> with the nice side effects that it

Re: Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Lawrence D’Oliveiro
On Thursday, June 30, 2016 at 7:26:01 PM UTC+12, Peter Otten wrote: > foo = lambda : > > there is syntactic sugar in Python that allows you to write it as > > def foo(): > return > > with the nice side effects that it improves the readability of tracebacks > and allows you to provide a

Fear and suspicion of lambdas, was Re: Meta decorator with parameters, defined in explicit functions

2016-06-30 Thread Peter Otten
Lawrence D’Oliveiro wrote: > On Tuesday, June 28, 2016 at 5:03:08 PM UTC+12, Ben Finney wrote: > >> I would like to see a more Pythonic, more explicit and expressive >> replacement with its component parts easily understood. > > I don’t know why this fear and suspicion of lambdas is so