New submission from Facundo Batista: Currently (tested on py3.4):
>>> from datetime import datetime, date >>> d = datetime.now() >>> date(d) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required (got type datetime.datetime) IMO, it's like doing int(float), a truncation of some info. For example, this is what I want to happen: >>> d datetime.datetime(2014, 7, 24, 11, 38, 44, 966613) >>> date(d) datetime.date(2014, 7, 24) ---------- messages: 223840 nosy: facundobatista priority: normal severity: normal status: open title: datetime.datetime() should accept a datetime.date as constructor versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22058> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com