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

Terry Reedy tjreedy at udel.edu
Thu Jul 21 14:50:52 EDT 2016

On 7/21/2016 10:25 AM, Steven D'Aprano wrote:

> Imagine, if you will, that somebody you could declare a "dialect" at the
> start of Python modules, just after the optional language cookie:
> # -*- coding: utf-8 -*-
> # -*- dialect math -*-
> which would tell importlib to run the code through some sort of
> source/AST transformation before importing it. That will allow us to
> localise the keywords, introduce new operators, and all the other things
> Guido hates *wink* and still be able to treat the code as normal Python.

Or one could write a 'unipy' extension to an IDE like IDLE that would 
translate an entire editor buffer either way.  It would take less time 
than has been expended pushing for a change that will not happen in the 
near future.

> A bad idea? Probably an awful one. But it's worth experimenting with it,
> It will be fun, and it *just might* turn out to be a good idea.
> For the record, in the 1980s and 1990s, Apple used a similar idea for
> two of their scripting languages, Hypertalk and Applescript, allowing
> users to localise keywords. Hypertalk is now defunct, and Applescript
> has dropped that feature, which suggests that it is a bad idea. Or maybe
> it was just ahead of its time.

Terry Jan Reedy

More information about the Python-ideas mailing list