In message <4c6a9c72.4040...@sschwarzer.net>, Stefan Schwarzer wrote:

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

Might I suggest (guessing at the argument keywords here) :

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

Presumably FromFormat should be localizable, rather than hard-coded.

See, that’s the kind of thing you notice when you think about the code in 
this way.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to