[Python-ideas] Syntax for passing lambdas to functions
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Feb 27 08:14:08 CET 2014
More information about the Python-ideas mailing list
Thu Feb 27 08:14:08 CET 2014
- Previous message: [Python-ideas] Syntax for passing lambdas to functions
- Next message: [Python-ideas] Syntax for passing lambdas to functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven D'Aprano wrote: > It's really a bad idea to have syntax for a "shorter lambda" > that works here: > > f(arg=***whatever***) > > but not in these: > > f(***whatever***) > [len, zip, map, ***whatever***, some_function] > result = ***whatever***(arg) The last one could be made to work as well, then it would be less of a special case. It would be a specialised form of assignment that's optimised for binding a name to a function, similar to def except that the body is an expression rather than a statement. -- Greg
- Previous message: [Python-ideas] Syntax for passing lambdas to functions
- Next message: [Python-ideas] Syntax for passing lambdas to functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list