[issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True

Tim Peters report at bugs.python.org
Fri Mar 7 17:41:29 CET 2014


Tim Peters added the comment:

[Nick]
> - deprecate aware time() entirely (raises the thorny question of what to return from .time() on an aware datetime() object)

aware_datetime_object.time() already returns a naive time object.  The thorny question is what .timetz() should return - but if aware time objects _were_ deprecated, .timetz() itself would presumably be deprecated too.

> ... you can't easily attach a date to the time to calculate a time delta.

The class constructor datetime.combine(date_object, time_object) makes it easy to combine any two date and time objects into a datetime object.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13936>
_______________________________________


More information about the Python-bugs-list mailing list