[Tutor] Good approach regarding classes attributes
Juan Christian
juan0christian at gmail.com
Tue Sep 9 15:54:22 CEST 2014
On Mon, Sep 8, 2014 at 5:58 AM, Peter Otten <__peter__ at web.de <javascript:;>>
wrote:
>
> PS: This is not about being pythonic, but it might be more convenient for
> client code if you use datetime objects instead of timestamps:
>
> >>> import datetime
> >>> last_logoff = datetime.datetime.utcfromtimestamp(1410065399)
> >>> print(last_logoff)
> 2014-09-07 04:49:59
>
Yes, I'll do it for sure, the API response is indeed returned that way to
make things easier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140909/aacbe49f/attachment.html>
More information about the Tutor
mailing list