Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31707
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'compiler': 0.05; 'context': 0.05; 'c++,': 0.07; 'continuation': 0.07; 'python': 0.09; 'any.': 0.09; 'backslash': 0.09; 'unexpected': 0.09; 'cc:addr:python-list': 0.10; '2.7': 0.13; 'aug': 0.13; '(#1,': 0.16; '1.5.2': 0.16; 'amsterdam': 0.16; 'backslash,': 0.16; 'next.': 0.16; 'oct': 0.16; 'syntaxerror:': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.17; 'thu,': 0.17; '"",': 0.22; 'visible': 0.22; 'cc:2**0': 0.23; 'statement': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'wonder': 0.27; 'c++': 0.27; 'errors.': 0.27; "doesn't": 0.28; 'went': 0.28; '>>>>': 0.29; 'accidentally': 0.29; "d'aprano": 0.29; 'diagnose': 0.29; 'steven': 0.29; 'whitespace': 0.29; 'character': 0.29; 'probably': 0.29; 'usually': 0.30; 'file': 0.32; 'avoiding': 0.33; 'problem,': 0.35; 'pm,': 0.35; 'continue': 0.35; 'but': 0.36; 'characters': 0.36; 'totally': 0.36; 'possible': 0.37; 'editor': 0.37; 'quite': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'received:192': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'subject:-': 0.40; 'your': 0.60; 'back': 0.62; 'truly': 0.62; 'hear': 0.63; 'more': 0.63; 'header:Reply- To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'habit': 0.91; 'angel': 0.93 |
| Date | Thu, 18 Oct 2012 22:00:55 -0400 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 |
| MIME-Version | 1.0 |
| To | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
| Subject | Re: A desperate lunge for on-topic-ness |
| References | <CANaSqUfLX7V2OxhO+fdVtmQcDzNfEgQfutHak_G-9_1_4nNr1Q@mail.gmail.com> <50802B5B.6040902@cs.wisc.edu> <CAPTjJmqGmYHD7vTdWdSq-Ro4ZCv2z=3zea92iahy-7Qx4=NoOg@mail.gmail.com> <mailman.2454.1350578890.27098.python-list@python.org> <5080aadf$0$29971$c3e8da3$5496439d@news.astraweb.com> |
| In-Reply-To | <5080aadf$0$29971$c3e8da3$5496439d@news.astraweb.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:YtPM9DYtUpyiObq4L7ZwDhDYNWQs+zuTKwN3ofVQX6U t4yvbxCdr91Sypn0NkvUYDitLNsgHtW3AovxqZe83LxRUJdu6H gt3vyKU4wAK1VeEHRclAxSvzbSJY4f9Sc6kRH8JNWRLFGAKBGN YFYVZikxO6RGWyRWiuNXqRjlezlX8odBpC6OZ7tCvQVBdR+TLK P7GaIKkXrly0esmsT4zRVXcXzBb6r+g0pbViFaldi0CMEdpyGC cnJVTnQjH43OosrPiZp05hY9VsvZ75Tb3kUsX9kfe0Em9wpYPU y5wEOG/TgUONoQaWJzUyRFd2T6zul2ryR4ruLJCZdHup34I2g= = |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.2490.1350612076.27098.python-list@python.org> (permalink) |
| Lines | 51 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1350612076 news.xs4all.nl 6970 [2001:888:2000:d::a6]:47540 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:31707 |
Show key headers only | View raw
On 10/18/2012 09:20 PM, Steven D'Aprano wrote: > On Thu, 18 Oct 2012 12:47:48 -0400, Dave Angel wrote: > >> I never use the backslash at end-of-line to continue a statement to the >> next. Not only is it a readability problem, but if your editor doesn't >> have visible spaces, you can accidentally have whitespace after the >> backslash, and wonder what went wrong. > What, you don't read the SyntaxError that you will invariably get? > > > # Python 2.7 and 3.3: > > py> x = 42 + \ > File "<stdin>", line 1 > x = 42 + \ > ^ > SyntaxError: unexpected character after line continuation character > > > > Even if you go back to truly ancient Python 1.5: > > [steve@ando ~]$ python1.5 > Python 1.5.2 (#1, Aug 27 2012, 09:09:18) [GCC 4.1.2 20080704 (Red Hat > 4.1.2-52)] on linux2 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>>> x = 42 + \ > File "<stdin>", line 1 > x = 42 + \ > ^ > SyntaxError: invalid token > > > Honestly, it's not that hard to diagnose line continuation errors. It's > probably easier to diagnose them than to diagnose missing parentheses. > > The more I hear people dissing line continuation backslashes, the more I > want to use them everywhere. The context was both C++ and python, and I got into the habit of avoiding the continuation characters in C++, where the compiler usually has a totally stupid error, if any. it's been so long since I've used them, it's quite possible I never tried it in python. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: A desperate lunge for on-topic-ness Dave Angel <d@davea.name> - 2012-10-18 12:47 -0400
Re: A desperate lunge for on-topic-ness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-19 01:20 +0000
Re: A desperate lunge for on-topic-ness Dave Angel <d@davea.name> - 2012-10-18 22:00 -0400
csiph-web