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

David Mertz mertz at gnosis.cx
Wed Jul 13 01:40:55 EDT 2016

I use the vim conceal plugin myself too.  It's whimsical, but I like the
appearance of it.  So I get the sentiment of the original poster.  But in
my conceal configuration, I substitute a bunch of characters visually (if
the attachment works, and screenshot example of some, but not all will be
in this message).  And honestly, having my text editor make the
substitution is exactly what I want.

If anyone really wanted, a very simple preprocessor (really just a few
lines of sed, or a few str.replace() calls) could transform your *.py+
files into *.py by simple string substitution.  There's no need to change
the inherent syntax.  This would not be nearly as big a change as a
superset language like Coconut (which looks interesting), it's just 1-to-1
correspondence between strings.

Moreover, even if special characters *were* part of Python, I'd probably
want my text editor to provide me shortcuts or aliases.  I have no idea how
to enter the Unicode GREEK LUNATE EPSILON SYMBOL directly from my
keyboard.  It would be much more practical for me to type '\epsilon' (a lá
LaTeX), or really just 'in', and let my editor alias/substitute that for
me.  Likewise, to get a GREEK SMALL LETTER LAMDA, a very nice editor
shortcut would be 'lambda'.  Same goes if someone make a py+-preprocessor
that takes the various special symbols—I'd still want mnemonics that are
more easily available on my keyboard.

On Tue, Jul 12, 2016 at 8:25 PM, Chris Angelico <rosuav at gmail.com> wrote:

> A fair point. But Python has a strong mathematical side (look how big
> the numpy/scipy/matplotlib communities are), and we've already seen
> how strongly they prefer "a @ b" to "a.matmul(b)". If there's support
> for a language variant that uses more and shorter symbols, that would
> be where I'd expect to find it.

Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160712/4e2c5425/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vim-screen.jpg
Type: image/jpeg
Size: 71970 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160712/4e2c5425/attachment-0001.jpg>

More information about the Python-ideas mailing list