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


Groups > comp.lang.python > #88245

Re: Proposal for new minor syntax

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'assignment': 0.07; 'versions.': 0.07; 'string': 0.09; "'.'": 0.09; 'augmented': 0.09; 'feature.': 0.09; 'python:': 0.09; 'python': 0.11; 'language.': 0.14; 'backwards': 0.16; 'delimiter': 0.16; 'governed': 0.16; 'identifier.': 0.16; 'literals': 0.16; 'meanwhile': 0.16; 'operator.': 0.16; 'operators.': 0.16; 'sugar': 0.16; 'syntactic': 0.16; 'unambiguous': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'appears': 0.22; 'rules': 0.22; 'issue,': 0.24; 'non': 0.24; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '3.x': 0.31; 'compatible': 0.32; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'sequence': 0.36; 'should': 0.36; 'list': 0.37; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'does': 0.39; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'new': 0.61; 'situation': 0.65; 'between': 0.67; 'believe': 0.68; 'mar': 0.68; 'legal': 0.71; '2015': 0.84; 'subject:Proposal': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=aZ1CwX3AHD7F1Oq01cbebHbgGcwo3qEUWaQ3GNar1QQ=; b=Oc3ADVrviROARkJtor7PZIAuWZMThCsNWXHLIANyZRG5AIv1DVoITMXTt703sIdCWj HhE8E660BwPNvwfomvrov/eVi/hVq6B3DPmZdzUAE81p/fW0v//tkmuewyyhTiSZE/Jh FHD//5GZplZYiX1OwS6efHDrTqHWhtHBu5L/NFxXRh3pEvAkqVqUmLfO/3HEi4DJFxEp cWcT4gbipf52aPkNJnY+BTxFpbJ5WdbRu/PZUNuHMISXuMtkSHw6xz8vK+9QkwngZWLj GuX4MmjrjFF8F7dLw2o3m+CXTIGStif4NZOVVPlliPzOk8lSx7E3MlBHtzYceNuegIj/ KS8Q==
X-Received by 10.70.100.39 with SMTP id ev7mr47881076pdb.29.1427602593456; Sat, 28 Mar 2015 21:16:33 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <kkfdhapjpmfu5vmj2he6ffuvvdthteigfu@4ax.com>
References <CAPauRLMMAT-OffHTYW6GPybAZzouc7H9BjrmvVQiSig0X3x+ig@mail.gmail.com> <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 Sat, 28 Mar 2015 22:15:53 -0600
Subject Re: Proposal for new minor syntax
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.298.1427602602.10327.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1427602602 news.xs4all.nl 2886 [2001:888:2000:d::a6]:57510
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:88245

Show key headers only | 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