Strange use of Lambda arrow

MRAB python at mrabarnett.plus.com
Fri Jun 5 21:48:36 EDT 2020


On 2020-06-06 01:01, Chris Angelico wrote:
> On Sat, Jun 6, 2020 at 8:24 AM Cameron Simpson <cs at cskk.id.au> wrote:
>> The OP may be being confused by JavaScript, where they have "arrow
>> functions", which are what Python calls lambda: anonymous functions. It
>> uses an arrow in the syntax:
>>
>>     (x,y) -> x+y
>>
> 
> In JS, they're sometimes called "fat arrow" functions, because they
> are spelled "=>". Maybe there's some other language where they're
> spelled "->"?
> 
I think it's Cameron who's confused. :-)

The OP said "Java". Java has "->"; JavaScript has "=>".


More information about the Python-list mailing list