Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31626
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <z@etiol.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.024 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'received:209.85.223': 0.03; 'badly': 0.07; 'extent': 0.07; 'missed': 0.09; 'planned.': 0.09; '"this': 0.13; ':-)': 0.13; '[never': 0.16; 'arg2,': 0.16; 'follow-up': 0.16; 'limit.': 0.16; 'parentheses': 0.16; 'temp': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'variable': 0.20; 'assignment': 0.22; "i've": 0.23; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'options': 0.27; '>>>>': 0.29; 'agreed.': 0.29; "d'aprano": 0.29; 'editors': 0.29; 'indentation': 0.29; 'steven': 0.29; 'character': 0.29; 'this.': 0.29; 'e.g.': 0.30; 'window': 0.30; 'handle': 0.33; 'to:addr:python-list': 0.33; 'likely': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'doing': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'except': 0.36; 'but': 0.36; 'characters': 0.36; 'should': 0.36; 'enough': 0.36; 'october': 0.37; 'being': 0.37; 'why': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'perform': 0.38; 'comment': 0.38; 'to:addr:python.org': 0.39; 'little': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'ever': 0.63; 'more': 0.63; 'exceed': 0.65; 'finally': 0.66; 'act.': 0.84; 'actually,': 0.84; 'bitten': 0.84; 'extra.': 0.84; 'dirty': 0.91; 'hate': 0.93; 'reducing': 0.95 |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:content-type :x-gm-message-state; bh=3DHo5JL8HNZY9SxbANbRTfChxp5nQ8nn0F1sIWVOWG4=; b=M1+4vo4/2YSu0SCwK9BvlWU4iiDiidRgLJxq0JeUAbiyDi8yTneTs9hgfxrpalWe/E W3K8WBJZvZJjGh9rZkWP7RaSDxajqj2eOODG8oy13RYOGvmEXEjI3ETg0+x7tn8eK1JN FjIVEA4jLM7NUHypnUiXL/bWB6k8xAyOQlvPU5RBWDH13Er0T/+NrD2lLup8+T2wBP1O ZTjLxHPiuUZ8Hn7HuhiMCBV0QNLwZ8GZ8mpBBUJZoGcdgXhgqTH7oDzx2gT4T5AZW6eT OKhGguyuFFJgRddCFmARm4IxiknO3qtnbvrvVk1CG0hOX7EqvfdhGGnCo/RkCxSI5y8A Kiyg== |
| MIME-Version | 1.0 |
| Sender | z@etiol.net |
| X-Originating-IP | [190.104.26.20] |
| In-Reply-To | <507fa256$0$11093$c3e8da3@news.astraweb.com> |
| References | <mailman.2403.1350540402.27098.python-list@python.org> <507fa256$0$11093$c3e8da3@news.astraweb.com> |
| From | Zero Piraeus <schesis@gmail.com> |
| Date | Thu, 18 Oct 2012 06:31:50 -0400 |
| X-Google-Sender-Auth | 0sz9NAT9fyCxphe-7DXs6aQUCZs |
| Subject | Re: A desperate lunge for on-topic-ness |
| To | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| X-Gm-Message-State | ALoCoQk/Vp08e3FlSwgJCBGaAIuSE/p3mt22qZ82QpiWkxVTfirag1Tunp0TgG/YzWQ2/hAk1unh |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| 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.2423.1350556333.27098.python-list@python.org> (permalink) |
| Lines | 63 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1350556333 news.xs4all.nl 6923 [2001:888:2000:d::a6]:45432 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:31626 |
Show key headers only | View raw
:
There seems to be a consensus [to the extent there ever is, anyway]
around using parentheses etc., then ...
On 18 October 2012 02:31, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> I've been burnt enough by word-wrapping in editors that don't handle word-
> wrapping that well that it makes me really uncomfortable to go over 78-79
> characters, even by only 1 extra. So I don't like doing this.
I have to admit, I try quite hard not to exceed 78. I don't know why
[never been bitten by badly behaved editors], but something about 79
characters in an 80-char window makes me uncomfortable.
> Just about the only time I go over is if I have a comment that includes a
> URL with more than 78 characters. I hate breaking URLs more than I hate
> breaking the 79 character limit.
Agreed.
> You missed one:
>
> 5a. Perform an assignment to a temp variable that you really should have
> done anyway, but reducing the number of characters in the line was the
> impetus that finally made you act.
Ah. Yes :-)
On 18 October 2012 05:33, <wxjmfauth@gmail.com> wrote:
> I use a "double indentation".
>
>>>> if 'asdf' and 'asdf' and 'asdf' \
> ... 'asdf' and 'asdf' and \
> ... 'asdf' and 'asdf':
> ... print('do if')
> ... s = 'asdf'
> ... ss = 'asdf'
Actually, I had a follow-up question about indentation planned. I used
to double-indent, but am now more likely to go with e.g.
>>> if check_something(
... arg1,
... arg2,
... arg3
... ):
... do_something()
as others have suggested. An alternative would be something like
>>> if check_something(arg1,
... arg2,
... arg3):
... do_something()
which I like much less. I have to admit, though, that all the original
options make me feel a little dirty except (#4) "shorter variable
names" [which just makes me feel that I am being overly precious] and
(#6 generalised) "this needs refactoring" [which I would say includes
Steven's #5a].
-[]z.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A desperate lunge for on-topic-ness Zero Piraeus <schesis@gmail.com> - 2012-10-18 02:06 -0400
Re: A desperate lunge for on-topic-ness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-18 06:31 +0000
Re: A desperate lunge for on-topic-ness Hans Mulder <hansmu@xs4all.nl> - 2012-10-18 11:07 +0200
Re: A desperate lunge for on-topic-ness wxjmfauth@gmail.com - 2012-10-18 02:33 -0700
Re: A desperate lunge for on-topic-ness Tim Chase <python.list@tim.thechases.com> - 2012-10-18 06:05 -0500
Re: A desperate lunge for on-topic-ness Chris Angelico <rosuav@gmail.com> - 2012-10-18 21:01 +1100
RE: A desperate lunge for on-topic-ness "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-10-18 18:42 +0000
Re: A desperate lunge for on-topic-ness Ben Finney <ben+python@benfinney.id.au> - 2012-10-19 11:33 +1100
Re: A desperate lunge for on-topic-ness rusi <rustompmody@gmail.com> - 2012-10-18 20:35 -0700
Re: A desperate lunge for on-topic-ness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-19 04:08 +0000
Re: A desperate lunge for on-topic-ness Zero Piraeus <schesis@gmail.com> - 2012-10-18 06:31 -0400
Re: A desperate lunge for on-topic-ness rusi <rustompmody@gmail.com> - 2012-10-17 23:55 -0700
Re: A desperate lunge for on-topic-ness Paul Rubin <no.email@nospam.invalid> - 2012-10-17 23:56 -0700
Re: A desperate lunge for on-topic-ness Grant Edwards <invalid@invalid.invalid> - 2012-10-18 13:16 +0000
Re: A desperate lunge for on-topic-ness Ben Finney <ben+python@benfinney.id.au> - 2012-10-19 11:39 +1100
Re: A desperate lunge for on-topic-ness Den <patentsvnc@gmail.com> - 2012-10-18 08:55 -0700
Re: A desperate lunge for on-topic-ness Neil Cerutti <neilc@norwich.edu> - 2012-10-18 16:13 +0000
Re: A desperate lunge for on-topic-ness Chris Angelico <rosuav@gmail.com> - 2012-10-19 03:21 +1100
RE: A desperate lunge for on-topic-ness "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-10-18 18:51 +0000
RE: A desperate lunge for on-topic-ness "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-10-18 18:50 +0000
Re: A desperate lunge for on-topic-ness Zero Piraeus <schesis@gmail.com> - 2012-10-18 17:36 -0400
Re: A desperate lunge for on-topic-ness Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-19 01:50 +0000
Re: A desperate lunge for on-topic-ness Den <patentsvnc@gmail.com> - 2012-10-18 08:55 -0700
Re: A desperate lunge for on-topic-ness Grant Edwards <invalid@invalid.invalid> - 2012-10-18 17:44 +0000
Re: A desperate lunge for on-topic-ness Gene Heskett <gheskett@wdtv.com> - 2012-10-18 18:53 -0400
Re: A desperate lunge for on-topic-ness Krzysztof Voss <shobbo@gmail.com> - 2012-10-19 15:16 -0700
Re: A desperate lunge for on-topic-ness Krzysztof Voss <shobbo@gmail.com> - 2012-10-19 15:16 -0700
csiph-web