[Python-ideas] allow `lambda' to be spelled λ

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Jul 14 00:01:15 EDT 2016

> On Jul 13, 2016, at 9:44 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> I think 
> you are underestimating the *practical* difficulties for input.

I appreciate those difficulties (I am typing this on an iPhone), but I think they are irrelevant.  I can imagine 3 scenarios:

1. (The 99% case) You will never see λ in the code and never write it yourself.  You can be happily unaware of this feature. 

2. You see λ occasionally, but don't like it.  You continue using spelled out "lambda" (or just use "def") in the code that you write.

3. You work on a project where local coding style mandates that lambda is spelled λ.  In this case, there will be plenty of places in the code base to copy and paste λ from. (In the worst case you copy and paste it from the coding style manual.)  More likely, however, the project that requires λ would have a precommit hook that translates lambda to λ in all new code and you can continue using the 6-character keyword in your input. 

More information about the Python-ideas mailing list