Python and PEP8 - Recommendations on breaking up long lines?

Roel Schroeven roel at roelschroeven.net
Thu Nov 28 13:37:15 EST 2013


Victor Hooi schreef:
>             with open(self.full_path, 'r') as input, open(self.output_csv, 'ab') as output:

I think I would write that as

     with open(self.full_path, 'r') as input:
         with open(self.output_csv, 'ab') as output:

That introduces an extra indentation level, but that doesn't really 
bother me. Does this seem like a good idea?


Best regards,
Roel

-- 
"Met een spitsvondig citaat bewijs je niets."
         -- Voltaire




More information about the Python-list mailing list