PEP 312 - Making lambdas implicit worries me, surely it's just the name 'lambda' that is bad...

Karl A. Krueger kkrueger at example.edu
Wed Mar 12 22:00:38 EST 2003


"Greg Ewing (using news.cis.dfn.de)" <me at privacy.net> wrote:
> Stephen Horne wrote:
>> In general, I like all but the most obvious constructs to have a
>> leading keyword - even if it's an abbreviation - because as a last
>> resort the reader can always look up that keyword to find an
>> explanation of the syntax and what it means.
> 
> That's a very good point.
> 
> If I were re-designing Python I would probably just
> replace "lambda" with "func". ("fn" is a bit too short
> for my liking, and besides, how do you pronounce it?)

Oddly enough, the limitation of Python lambda is reminiscent of the
DEF FN statements in some flavors of BASIC.  Like Python lambda, a BASIC
function defined with DEF FN -- in at least some of the flavors of micro
BASIC that damaged my brain in my youth -- could not contain statements.

-- 
Karl A. Krueger <kkrueger at example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews




More information about the Python-list mailing list