>
> Yes, because exe-time is not a ate, a point in time, but a time delta (a
> difference), thus does not hold the same attributes. Write out dir() on
> 'now' and on 'exe_time' to get more info. [dir() tells you about what info
> an object knows, and what methods it understands).]


Thanks Denis, that's very useful. I guess I was trying to deduce the same
information from the documentation but dir is a good way of double checking.


> This is a correct and general solution. Maybe worth being built-in, in
> fact, in my view.


Thanks for confirming. Yes, exactly, I was hoping to achieve this without
all the modulus calculations.

Cheers,
Jignesh



On 11 December 2013 21:18, spir <denis.s...@gmail.com> wrote:

> On 12/11/2013 06:40 PM, Jignesh Sutar wrote:
>
>> c = b-a
>> print "%s days, %.2dh: %.2dm: %.2ds" %
>> (c.days,c.seconds//3600,(c.seconds//60)%60, c.seconds%60)
>>
>
> This is a correct and general solution. Maybe worth being built-in, in
> fact, in my view.
>
> Denis
>
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to