On Tue, 17 Aug 2010 16:28:02 +0200
Stefan Schwarzer <sschwar...@sschwarzer.net> wrote:
> 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')

You can extend this if there are complicated sub-calls.  Probably
overkill for this example but here is the idea.

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

I also moved the closing brace down to align with the line that opened
that block.

-- 
D'Arcy J.M. Cain <da...@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to