Python and PEP8 - Recommendations on breaking up long lines?

Chris Angelico rosuav at gmail.com
Thu Nov 28 09:21:04 EST 2013


On Fri, Nov 29, 2013 at 1:04 AM, Tim Chase
<python.list at 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



More information about the Python-list mailing list