79 chars or more?

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Aug 20 09:56:17 EDT 2010


Stefan Schwarzer a écrit :
> Hi Neil,
> 
> On 2010-08-17 14:42, Neil Cerutti wrote:
(snip)
>> 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')


make this :

            self.expiration_date = translate_date(
                find(response, 'MPNExpirationDate').text,
                '%Y-%m-%d',
                '%m%d%Y'
                )

I just HATE closing parens on the same line when the args don't fit on 
one single line.


Significant indentation only solves one single issue when it comes to 
coding conventions war !-)



More information about the Python-list mailing list