Hacker News new | ask | show | jobs
by ausjke 1979 days ago
since lambda is for simple and short anonymous functions most of the time why do I need type the whole word each time? can they also do what javascript does(or similar):

    x => x * 2
instead of

    lambda x : x * 2
2 comments

Until very recently, Python’s grammar was strictly LL(1), so the parser couldn’t handle, for example, `(x, y) => x * y`.

Perhaps with the move to a PEG parser, this syntax could now be supported?

I like:

    λx: x*2