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

Joao S. O. Bueno jsbueno at python.org.br
Tue Jul 12 20:00:16 EDT 2016

Have you met the coconut project already?
They create a superset of Python with the aim to allow writting smaller
functional programs, and have a super-featured functional set of
operators and such.

It is a pure-Python project that pre-compiles their "coconut" program
files to .py at compile time -
They have a shorter syntax for lambda already - maybe that could be of
use to you - and
maybe you can get them to accept your suggestion - it certainly would fit there.

Coconut provides the simple, clean -> operator as an alternative to
Python’s lambda statements. The operator has the same precedence as
the old statement.


In Python, lambdas are ugly and bulky, requiring the entire word
lambda to be written out every time one is constructed. This is fine
if in-line functions are very rarely needed, but in functional
programming in-line functions are an essential tool.


dubsums = map((x, y) -> 2*(x+y), range(0, 10), range(10, 20))


More information about the Python-ideas mailing list