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

2019-08-25 Thread Elinaldo Monteiro
Elinaldo Monteiro added the comment: I am closed my issue. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2019-08-22 Thread Elinaldo Monteiro
Elinaldo Monteiro 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

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

2019-08-22 Thread Elinaldo Monteiro
New submission from Elinaldo Monteiro : Hello, Does it make sense to exist theses 2 methods in class timedelta? @property def hours(self): return self._seconds // 3600 @property def minutes(self): return self._seconds // 60 -- messages: 350182 nosy: elinaldosoft priority