Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!ecngs!feeder2.ecngs.de!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'programmer': 0.03; 'operator': 0.03; 'syntax': 0.04; 'acceptance': 0.09; 'statements': 0.09; 'python': 0.11; '"hello': 0.16; 'of)': 0.16; 'right-hand': 0.16; 'side.': 0.16; 'syntactic': 0.16; 'thanks,': 0.17; 'code.': 0.18; 'variable': 0.18; 'slightly': 0.19; 'written': 0.21; 'example': 0.22; 'propose': 0.24; 'code:': 0.26; 'idea': 0.28; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'piece': 0.31; 'another': 0.32; 'could': 0.34; 'something': 0.35; 'received:google.com': 0.35; 'belong': 0.36; 'next': 0.36; 'method': 0.36; 'similar': 0.36; 'example,': 0.37; 'subject:new': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'skip:\xc2 10': 0.60; 'helps': 0.61; 'new': 0.61; 'field': 0.63; 'more': 0.64; 'chance': 0.65; 'linked': 0.65; 'world': 0.66; 'header:Reply-To:1': 0.67; 'reply- to:no real name:2**0': 0.71; 'hand': 0.80; 'as:': 0.81; 'short,': 0.84; 'subject:Proposal': 0.91; 'write:': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bristol.ac.uk; s=google; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=wYZr1Ot8sofgFTpFCjRRjFc9CY5uzSphRcePiPtu0GA=; b=RUXGM0bWO5VUI+hNHhmL86VGOPkBFdCrIPbDUHadEchR3TiBUC2UycYeWXL9EOl+lZ mVt1RGEOchfaAEBRBL6jh9+KX/xT1ihAUzoCJidFA0IMYdZTiVJI8sz+4DlH23/u+wwq WLnXZeJAKepYTJEonoYVBiZp+aAetPkFO80WQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:date:message-id:subject :from:to:content-type; bh=wYZr1Ot8sofgFTpFCjRRjFc9CY5uzSphRcePiPtu0GA=; b=Wpvcqfd00cOiwGKOHaiHxyvq05lxLud1YM1isTF8AfzYE11+S/BZPuHotTSYqeQrrk M6n8e8AWfP9yUWYsIn5Va2HBb3uat0TImQMU2tMQg1IP9tEno82cbFIDGQjmUIzaPWre uKrdY6sHOOtcnBLPTvr4Z/zuX2zXh15cWl9cTVmHTd9WJQ++eVe77dvWWVxAVC0UDI50 OPNLiLifg4bjW2HqZ2szLMnNproMh1QBYCqCIR+TNeSkfLNpZqS01RAaoPvxaSuiQLM2 Cga2fkepbPz+cke0fmxwgrzEpp7KMhjdwG9gO7Cl+FYxsJunPnSNCeBpYS4+Y37DjLYD AKMA== X-Gm-Message-State: ALoCoQnV2oBhCU/GhE2UKDXPjYSZw/Dafk09nfIAXIbytGdAVIlI+zGUKEwm9U2AIpt1PGQDqRgW MIME-Version: 1.0 X-Received: by 10.60.155.135 with SMTP id vw7mr17746600oeb.62.1427487864091; Fri, 27 Mar 2015 13:24:24 -0700 (PDT) Reply-To: jw14896.2014@my.bristol.ac.uk Date: Fri, 27 Mar 2015 20:24:24 +0000 Subject: Proposal for new minor syntax From: Jamie Willis To: python-list@python.org Content-Type: multipart/alternative; boundary=047d7bd767200f90a605124aeb6a X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 66 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427487867 news.xs4all.nl 2876 [2001:888:2000:d::a6]:42351 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88181 --047d7bd767200f90a605124aeb6a Content-Type: text/plain; charset=UTF-8 I would like to propose a new piece of syntax for the python language; .= In short, the operator is form of syntactic sugar, for instance consider the following code: hello = "hello world " hello = hello.strip() This could be written as: hello = "hello world " hello .= strip() In this slightly contrived example, the programmer saved (a small amount of) time when writing the code. With code with longer variable names, or lots of similar statements all in a row, this helps to keep code more concise. The operator would be constricted to one method or field on the right-hand side, which must belong to the object on the left hand side. Another example could be when using Linked Lists, instead of writing something like: loop_node = loop_node.next you could write: loop_node .= next Does this idea have any chance of acceptance if submitted as a PEP? What are the potential concerns I could consider with the syntax? Thanks, Jamie --047d7bd767200f90a605124aeb6a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I would like to propose a new piece of syntax for the pyth= on language; .=3D

In short, the operator is form of synt= actic sugar, for instance consider the following code:

=
hello =3D "hello world =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0"
hello =3D hello.strip()

Thi= s could be written as:

hello =3D "hello world= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"
hello .= =3D strip()

In this slightly contrived example, th= e programmer saved (a small amount of) time when writing the code. With cod= e with longer variable names, or lots of similar statements all in a row, t= his helps to keep code more concise.=C2=A0

The ope= rator would be constricted to one method or field on the right-hand side, w= hich must belong to the object on the left hand side.

<= div>Another example could be when using Linked Lists, instead of writing so= mething like:

loop_node =3D loop_node.next

=
you could write:

loop_node .=3D next

Does this idea have any chance of acceptance if subm= itted as a PEP? What are the potential concerns I could consider with the s= yntax?

Thanks,

Jamie
--047d7bd767200f90a605124aeb6a--