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 !-)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to