Proposal for new minor syntax

Ian Kelly ian.g.kelly at gmail.com
Sun Mar 29 00:15:53 EDT 2015


On Sat, Mar 28, 2015 at 9:05 AM, Mario Figueiredo <marfig at gmail.com> wrote:
> Neiter the language. The dot symbol is a delimiter in the python
> grammar. Not an operator. And also defined as a delimiter in the
> official documentation, right after operators.

What does it matter? How '.' is lexed when it appears on its own
should make no difference to the lexing of '.='.

> Meanwhile augmented assignment is governed by the `augassign`
> nonterminal. An addition to its list would result in a non backwards
> compatible new syntactic sugar feature. This would mabe not be a big
> issue between 3.X and 2.X, but would, I reckon, be against the
> compatibility rules between 3.X versions.

How would it not be backwards compatible? I'm not able to come up with
any situation where the character sequence '.=' is currently legal
outside of string literals and comments.

The counter-proposed '=.' could be an issue, since this is currently
legal Python:

    x=.3

But I believe even that is still unambiguous since you couldn't
currently follow the =. with an identifier.



More information about the Python-list mailing list