[issue37914] class timedelta, support the method hours and minutes in field accessors

Elinaldo Monteiro report at bugs.python.org
Thu Aug 22 08:08:13 EDT 2019


Elinaldo Monteiro <elinaldosoft at gmail.com> added the comment:

Imagine the following scenario.

from datetime import timedelta
diff = timedelta(hours=23, minutes=59) - timedelta(hours=20, minutes=45)

Which is the simplest ?

diff.hours

diff.total_seconds() // 3600

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37914>
_______________________________________


More information about the Python-bugs-list mailing list