[issue22058] datetime.datetime() should accept a datetime.date as init parameter

Facundo Batista report at bugs.python.org
Thu Jul 24 22:12:32 CEST 2014


Facundo Batista added the comment:

El 24/07/14 a las 15:01, Tim Peters escibió:

> "datetime.date() should accept a datetime.datetime as init
> parameter"
> 
> instead?  That's what the example appears to be getting at.
> 
> If so, -1.  Datetime objects already have .date(), .time(), and
> .timetz() methods to extract, respectively, the date, naive time, and

Ah, I wasn't aware of the .date() method.

I guess because it's more natural to me to do int(a_float) than
a_float.integer().

So, unless anyody wants to pursue with this, I'll close the issue.

Thanks!

----------

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


More information about the Python-bugs-list mailing list