Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88245

Re: Proposal for new minor syntax

References (1 earlier) <mailman.278.1427489337.10327.python-list@python.org> <GplRw.1325750$ls6.204434@fx16.am4> <55167a22$0$13013$c3e8da3$5496439d@news.astraweb.com> <n9yRw.538774$dX1.489942@fx21.am4> <kkfdhapjpmfu5vmj2he6ffuvvdthteigfu@4ax.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2015-03-28 22:15 -0600
Subject Re: Proposal for new minor syntax
Newsgroups comp.lang.python
Message-ID <mailman.298.1427602602.10327.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Mar 28, 2015 at 9:05 AM, Mario Figueiredo <marfig@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Proposal for new minor syntax Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-27 14:48 -0600
  Re: Proposal for new minor syntax BartC <bc@freeuk.com> - 2015-03-27 23:08 +0000
    Re: Proposal for new minor syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 20:53 +1100
      Re: Proposal for new minor syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 21:43 +1100
        Re: Proposal for new minor syntax Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-04-09 09:32 +0200
      Re: Proposal for new minor syntax BartC <bc@freeuk.com> - 2015-03-28 13:38 +0000
        Re: Proposal for new minor syntax Mario Figueiredo <marfig@gmail.com> - 2015-03-28 16:05 +0100
          Re: Proposal for new minor syntax Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-28 22:15 -0600
            Re: Proposal for new minor syntax Rustom Mody <rustompmody@gmail.com> - 2015-03-28 21:50 -0700
  Re: Proposal for new minor syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 21:01 +1100

csiph-web