79 chars or more?

Neil Cerutti neilc at norwich.edu
Tue Aug 17 11:31:54 EDT 2010


On 2010-08-17, Stefan Schwarzer <sschwarzer at sschwarzer.net> wrote:
> Hi Neil,
>
> On 2010-08-17 14:42, Neil Cerutti wrote:
>> Looking through my code, the split-up lines almost always
>> include string literals or elimination of meaningless
>> temporary variables, e.g.:
>> 
>>         self.expiration_date = translate_date(find(response,
>>             'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y')
>
> I'd probably reformat this to
>
>           self.expiration_date = translate_date(
>             find(response, 'MPNExpirationDate').text,
>             '%Y-%m-%d', '%m%d%Y')
>
> or even
>
>           self.expiration_date = translate_date(
>             find(response, 'MPNExpirationDate').text,
>             '%Y-%m-%d',
>             '%m%d%Y')
>
> for consistency.
>
> This not only limits the width but also makes the nesting of
> the calls more visible.

Those are nice improvements. Thanks!

-- 
Neil Cerutti



More information about the Python-list mailing list