Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #60690

Re: Python and PEP8 - Recommendations on breaking up long lines?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.06; 'continuation': 0.07; 'input,': 0.09; 'yeah,': 0.09; 'cc:addr :python-list': 0.11; 'backslash': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:breaking': 0.16; 'wrote:': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'tim': 0.29; 'message- id:@mail.gmail.com': 0.30; 'chase': 0.31; 'fri,': 0.33; "i'd": 0.34; 'could': 0.34; 'received:google.com': 0.35; 'that!': 0.36; 'subject:?': 0.36; 'nov': 0.38; 'partial': 0.84; 'subject:long': 0.84; 'to:none': 0.92; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=z0A6Zd67RO/P1qZXO5QR/QBm5OO9tm3R5Z9xF+xZzsM=; b=KGxgVgAhFiFnVu4zqAJ8cadyg2fpdFeQmMXcyVBAjwBdlGPkwCy/uhR4foa2H+BGCu 4mgROxmugLOSNcfwHn4Tm9K8VbbYp9KSNZKqU/SX/h+JulZ/L4TQFSLvA0hXLFSMCGgl 8X/O/G6H4qk1SVyd7M87dCBakI/DWihbyWelo+qwWf835YvjAVdUiFkCMlkuwVuHoI2y gsWGF9UCI7332ySsmxKMma7yCyi4Q4xtYYpgfOpEZFRfsiCm8wU67cRJ0qJ2HZmfdElp PSd/aogcqekMyFDHt0ZhxSbqT36CaQ43nTGAs2j5GCtUyQD+aa8dPSpLN1YM9jS+s4cP Lmgg==
MIME-Version 1.0
X-Received by 10.52.170.78 with SMTP id ak14mr435119vdc.43.1385648464131; Thu, 28 Nov 2013 06:21:04 -0800 (PST)
In-Reply-To <20131128080413.10d4c808@bigbox.christie.dr>
References <a98cfbef-bc48-41e8-98de-e616f201ffbe@googlegroups.com> <mailman.3340.1385607612.18130.python-list@python.org> <5296bf7d$0$29995$c3e8da3$5496439d@news.astraweb.com> <20131128080413.10d4c808@bigbox.christie.dr>
Date Fri, 29 Nov 2013 01:21:04 +1100
Subject Re: Python and PEP8 - Recommendations on breaking up long lines?
From Chris Angelico <rosuav@gmail.com>
Cc python-list@python.org
Content-Type text/plain; charset=UTF-8
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 <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.3355.1385648472.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385648472 news.xs4all.nl 15939 [2001:888:2000:d::a6]:51284
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60690

Show key headers only | View raw


On Fri, Nov 29, 2013 at 1:04 AM, Tim Chase
<python.list@tim.thechases.com> wrote:
> You could work around this with:
>
>   from functools import partial
>   in_ = partial(open, self.full_path)
>   out_ = partial(open, self.output_csv, 'ab')
>   with in_() as input, out_() as output:
>     do_stuff()

Yeah, I think I'd prefer a backslash continuation to that!

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python and PEP8 - Recommendations on breaking up long lines? Victor Hooi <victorhooi@gmail.com> - 2013-11-27 17:57 -0800
  Re: Python and PEP8 - Recommendations on breaking up long lines? Victor Hooi <victorhooi@gmail.com> - 2013-11-27 18:03 -0800
    Re: Python and PEP8 - Recommendations on breaking up long lines? Ben Finney <ben+python@benfinney.id.au> - 2013-11-28 13:55 +1100
    Re: Python and PEP8 - Recommendations on breaking up long lines? Terry Reedy <tjreedy@udel.edu> - 2013-11-27 22:03 -0500
    Re: Python and PEP8 - Recommendations on breaking up long lines? Ned Batchelder <ned@nedbatchelder.com> - 2013-11-27 22:05 -0500
    Re: Python and PEP8 - Recommendations on breaking up long lines? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-11-28 08:12 +0200
      Re: Python and PEP8 - Recommendations on breaking up long lines? Chris Angelico <rosuav@gmail.com> - 2013-11-28 17:22 +1100
    Re: Python and PEP8 - Recommendations on breaking up long lines? Roy Smith <roy@panix.com> - 2013-11-28 10:08 -0500
  Re: Python and PEP8 - Recommendations on breaking up long lines? Ben Finney <ben+python@benfinney.id.au> - 2013-11-28 13:47 +1100
    Re: Python and PEP8 - Recommendations on breaking up long lines? Steven D'Aprano <steve@pearwood.info> - 2013-11-28 03:02 +0000
      Re: Python and PEP8 - Recommendations on breaking up long lines? Ben Finney <ben+python@benfinney.id.au> - 2013-11-28 14:14 +1100
  Re: Python and PEP8 - Recommendations on breaking up long lines? Terry Reedy <tjreedy@udel.edu> - 2013-11-27 21:55 -0500
  Re: Python and PEP8 - Recommendations on breaking up long lines? Ned Batchelder <ned@nedbatchelder.com> - 2013-11-27 21:59 -0500
    Re: Python and PEP8 - Recommendations on breaking up long lines? Steven D'Aprano <steve@pearwood.info> - 2013-11-28 03:58 +0000
      Re: Python and PEP8 - Recommendations on breaking up long lines? Tim Chase <python.list@tim.thechases.com> - 2013-11-28 08:04 -0600
      Re: Python and PEP8 - Recommendations on breaking up long lines? Chris Angelico <rosuav@gmail.com> - 2013-11-29 01:21 +1100
      Re: Python and PEP8 - Recommendations on breaking up long lines? Ned Batchelder <ned@nedbatchelder.com> - 2013-11-28 12:26 -0500
  Re: Python and PEP8 - Recommendations on breaking up long lines? Ben Finney <ben+python@benfinney.id.au> - 2013-11-28 14:06 +1100
  Re: Python and PEP8 - Recommendations on breaking up long lines? Neil Cerutti <mr.cerutti@gmail.com> - 2013-11-27 22:09 -0500
  Re: Python and PEP8 - Recommendations on breaking up long lines? Ethan Furman <ethan@stoneleaf.us> - 2013-11-27 19:15 -0800
  Re: Python and PEP8 - Recommendations on breaking up long lines? Steven D'Aprano <steve@pearwood.info> - 2013-11-28 03:57 +0000
    Re: Python and PEP8 - Recommendations on breaking up long lines? Steven D'Aprano <steve@pearwood.info> - 2013-11-28 04:03 +0000
  Re: Python and PEP8 - Recommendations on breaking up long lines? MRAB <python@mrabarnett.plus.com> - 2013-11-28 12:43 +0000
  Re: Python and PEP8 - Recommendations on breaking up long lines? Walter Hurry <walterhurry@lavabit.com> - 2013-11-28 17:38 +0000
  Re: Python and PEP8 - Recommendations on breaking up long lines? Roel Schroeven <roel@roelschroeven.net> - 2013-11-28 19:37 +0100
  Re: Python and PEP8 - Recommendations on breaking up long lines? Nick Mellor <thebalancepro@gmail.com> - 2013-12-04 17:47 -0800

csiph-web