Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88181
| 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 | <jw14896@my.bristol.ac.uk> |
| 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 <jw14896.2014@my.bristol.ac.uk> |
| 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 <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.275.1427487867.10327.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Proposal for new minor syntax Jamie Willis <jw14896.2014@my.bristol.ac.uk> - 2015-03-27 20:24 +0000 Proposal for new minor syntax Sayth <flebber.crue@gmail.com> - 2015-03-28 20:13 -0700
csiph-web