Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #11092
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.kpn.net!pfeed08.wxs.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <lanyjie@yahoo.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.110 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.82; '*S*': 0.04; 'example:': 0.03; 'lines.': 0.05; 'operator': 0.05; 'currently,': 0.07; 'operator,': 0.09; 'thoughts?': 0.09; 'to:name:python list': 0.09; 'skip:f 30': 0.13; '#the': 0.16; 'included,': 0.16; 'all,': 0.28; 'looks': 0.29; 'expression': 0.32; 'break': 0.32; 'usually': 0.32; 'to:addr :python-list': 0.33; 'wondering': 0.33; 'clearly': 0.34; 'but': 0.37; 'why': 0.39; 'to:addr:python.org': 0.39; 'received:98': 0.61; 'received:98.138.90': 0.64; 'received:bullet.mail.ne1.yahoo.com': 0.64; 'here': 0.65; 'received:98.138.91': 0.66; 'received:98.138': 0.67; 'received:mail.ne1.yahoo.com': 0.67; 'received:ne1.yahoo.com': 0.67; 'reply-to:addr:yahoo.com': 0.70; 'header:Reply-To:1': 0.71; 'subject:line': 0.73; 'received:98.138.90.57': 0.84; 'received:98.138.91.35': 0.84; 'received:nm28-vm1.bullet.mail.ne1.yahoo.com': 0.84; 'thing).': 0.84; '\xa0\xa0\xa0\xa0\xa0': 0.84 |
| X-Yahoo-Newman-Property | ymail-3 |
| X-Yahoo-Newman-Id | 456069.93136.bm@omp1019.mail.ne1.yahoo.com |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312951356; bh=9e1AQDoHFU5VB2Fmb1+prvpat087JbEKWuXPCCE8dvw=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nfHLKoFg9IHGxaKyHOm/cChYztV3slELbu16PLeNJDrjoaEe7NUHAK+IXuATyCH9SM8KmipJClek+fRCVmOtFomzkAtAOSQtYZGcVQAJ81pNmF3SCyrpF1euCLx9w831Q5XtwlSWkL5FfcOKrO9Ijal1xvfbggnmvS327tK8L6c= |
| DomainKey-Signature | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bXaMzNWj0juc+8SPqUh1idq8gkagimk6XZEg5pS/x6saLDMR1QLFxhBTAEisGpljQVDNoWVdwb+I0evJ1+29CZLUYcmFhm2DcV1NHqyg/wyDOn3Gm1g4HHdCuJH3ltEMwPQXelywxs/1TrBMA+OYz513GfmnH8yIFjVoNQPujMA=; |
| X-YMail-OSG | 1XfdyOkVM1nyFOacKaTDuzwA12gyiYwDPi0EMmY.G.elSXU UtwmDi61z6byrTVHlWsDuSPf70sCQgQhTZ23T1slFY5Dryuk8OtH3WWekJ_E VxBctqy0bVJh_qU81Tekc4u2_hLmJGjROMh1Dbn7vRsfKoNyvShrzDeCkvVZ NkwwgSKEmP1xhEW7jgC8RAFFhsSLPa6C3LL9s6b4L7CW_slTlX1mfy.EWHMf N9nj8FKe_e1gAAXIVK4XY.VsdEy0zLBH25j5wInCqL4vUnfsD7FhuSo_Ytiy oPRcawPehJMoxZJreL4lj5BE2h.62g.KP_nFnsPxAoZ80_gxlzQoJoL6W6iV QIUSBxD8TKKSTlcFXS0mL4d4_WLXiKZQ4o_Jc0neQsb3HdncM0NmHQyJe_G3 xaN4V0QwskPaVIe9NEJLKyXKrjz6rrcAqZU4J1Ixyaw-- |
| X-Mailer | YahooMailWebService/0.8.113.313619 |
| Date | Tue, 9 Aug 2011 21:42:36 -0700 (PDT) |
| From | Yingjie Lan <lanyjie@yahoo.com> |
| Subject | allow line break at operators |
| To | python list <python-list@python.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | Yingjie Lan <lanyjie@yahoo.com> |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2083.1312951551.1164.python-list@python.org> (permalink) |
| Lines | 11 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1312951551 news.xs4all.nl 23838 [2001:888:2000:d::a6]:45717 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:11092 |
Show key headers only | View raw
Hi all,
When writing a long expresion, one usually would like to break it into multiple lines. Currently, you may use a '\' to do so, but it looks a little awkward (more like machine-oriented thing). Therefore I start wondering why not allow line breaking at an operator, which is the standard way of breaking a long expression in publication? Here is an example:
#the old way
x = 1+2+3+4+\
1+2+3+4
#the new way
x = 1+2+3+4+ #line continues as it is clearly unfinished
1+2+3+4
Of course, the dot operator is also included, which may facilitate method chaining:
x = svg.append( 'circle' ).
r(2).cx(1).xy(1).
foreground('black').bkground('white')
Thoughts?
Yingjie
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
allow line break at operators Yingjie Lan <lanyjie@yahoo.com> - 2011-08-09 21:42 -0700 Re: allow line break at operators TheSaint <no@nowhere.net.no> - 2011-08-10 19:26 +0800
csiph-web