[Python-Dev] decorate-sort-undecorate

Guido van Rossum guido at python.org
Mon Oct 13 20:56:34 EDT 2003


> Guido:
> > >    [s for s in lst sortby s.lower()]
> > 
> > It suffers IMO from the "SQL syndrome": having reserved words to the
> > language that are only meaningful in a very specific syntax yet are
> > reserved everywhere.

[Greg]
> It could probably be a non-reserved keyword in this case.

Yes, but that would be error-prone, because to the parser it would hve
to look like an expression followed by an identifier followed by
another expression.  Many typos in the first expression can then turn
this into a valid but different expression.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list