[Python-ideas] allow `lambda' to be spelled λ
Chris Angelico
rosuav at gmail.com
Tue Jul 12 15:28:45 EDT 2016
On Wed, Jul 13, 2016 at 4:36 AM, <tritium-list at sdamon.com> wrote:
> For better or worse, except for string literals which can be anything as
> long as you set a coding comment, python is pure ascii which simplifies
> everything. Lambda is not in the first 128 characters of Unicode, so it is
> highly unlikely to be accepted.
Incorrect as of Python 3 - it's pure Unicode :) You can have
identifiers that use non-ASCII characters. The core language in the
default interpreter is all ASCII in order to make it easy for most
people to type, but there are variant Pythons that translate the
keywords into other languages (I believe there's a Chinese Python, and
possibly Korean?), which are then free to use whatever character set
they like. A variant Python would be welcome to translate all the
operators and keywords into single-character tokens, using Unicode
symbols for NOT EQUAL TO and so on - including using U+03BB in place
of 'lambda'.
ChrisA
More information about the Python-ideas
mailing list