A syntax idea for one-liners

Andrew Koenig ark at research.att.com
Sun May 25 19:38:11 EDT 2003


Beni> I've recently discovered a backward-compatible and relatively simple
Beni> and elegant syntax for encoding arbitrary sets of python statements
Beni> with different indentations in a single line.

In order to convince me that your proposal works, you will have to tell me
how to distinguish your proposed syntax from cases already permitted by
the Python syntax in which a : is followed by a statement on the same line.

For example, the following is legal in Python today:

        if x < y: x = y

I am not convinced that your proposal is always unambiguous in all contexts
that involve statements such as the one above.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list