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

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Jul 13 23:17:15 EDT 2016



> On Jul 13, 2016, at 8:57 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> 
> Does Python currently use any one-letter keywords?

No.

> So why start now?

There is no slippery slope or a hidden agenda in this proposal.  The lambda keyword is unique in the Python language.  It is the only keyword that does not have an obvious meaning as an English word or an abbreviation of such.  There is no other keyword that literally is a name of a letter.  (Luckily, iota and rho are spelled range and len in Python and those are not keywords anyways.)

Arguably, it would be more Pythonic to spell an anonymous function creation keyword as "function" or "fun" ("func" does not smell right), but Python ended up with an English name for a Greek letter.  That was before Unicode became ubiquitous.  I don't see much harm in allowing a proper spelling for it now. 


More information about the Python-ideas mailing list